Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:58:09+00:00 2026-06-17T12:58:09+00:00

I have several forms in the same view, and it seems that they are

  • 0

I have several forms in the same view, and it seems that they are conflicting with each other. I have a form that is supposed to call the reveal action in the users controller but instead it is calling the logins action in the user controller.

Here is my config/routes.rb:

get "logins" => 'users#logins', :as => 'logins'
delete "logins" => 'users#deletelogin', :as => 'logins'
post 'logins' => 'users#addlogin', :as => 'add_login'
get "logins" => 'users#search', :as => 'search'
get "logins" => 'users#reveal', :as => 'reveal'

Here is the button that is linking to the wrong action:

<td><%= button_to "Reveal", { :controller => :users, :action => 'reveal', :id => login.id }, method: :get, :class => 'btn' %></td>

This is the html that is rendering:

<td><form action="/logins?id=24" class="button_to" method="post"><div><input class="btn" type="submit" value="Reveal" /><input name="authenticity_token" type="hidden" value="POKdWunwvaKQHb+Mzj/3UrG0xIbKPqELy4n3VGqGrxU=" /></div></form></td>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:58:10+00:00Added an answer on June 17, 2026 at 12:58 pm

    All three get methods map to the /logins url, so the behaviour is expected.

    The first part in the hash used in the get method defines the actual path that will be used in the url. You’ll have to do something like:

    get "logins" => 'users#logins', :as => 'logins'
    get "search" => 'users#search', :as => 'search'
    get "reveal" => 'users#reveal', :as => 'reveal'
    

    to get the desired effect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that has several ajax submission forms. Each form has a
I have a website with several forms that all pass the same set of
I have a page that contains several forms, by submitting each one of them,
I have several forms(user can add new form dynamically) in one page, they're all
I'have several forms that use the same Listboxes. The ListBoxes are populated from a
I have several forms on one page, they're all the same, but have different
I have an app that lets the user interact with several forms. I can
I have a form that is generated based on several DataTemplate elements. One of
I have a one form tag inside my Index.aspx view. Index.aspx contains several partial
I have a partial that is used in several views. The partial contains forms.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.