title: No route matches {:action=>"show", :controller=>"users"}
body: <p>I'm trying to implement a Twitter Boostrap login form, that's gonna be used on every page (because the navigation bar is a part of the layout).</p>
  
  <p>However, when trying the code below I get the following error:</p>
  
  <pre><code>No route matches {:action=&gt;"show", :controller=&gt;"users"}
  </code></pre>
  
  <p><strong>User controller:</strong></p>
  
  <pre><code>class UsersController &lt; ApplicationController
  
    def index
      @users = User.all
    end
  
    def show
      ...
    end
  
    def login
      ...
    end
  
  end
  </code></pre>
  
  <p><strong>_navigation.html.erb:</strong></p>
  
  <pre><code>&lt;div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;"&gt;
      &lt;%= form_for("user", :url =&gt; user_path) do |f| %&gt;
          &lt;%= f.label :email%&gt;
          &lt;%= f.text_field(:email, :size =&gt; 30, :class =&gt; 'login_field', :placeholder =&gt; 'Användarnamn')%&gt;
          &lt;%= f.label :password%&gt;
          &lt;%= f.text_field(:password, :size =&gt; 30, :class =&gt; 'login_field', :placeholder =&gt; 'Lösenord')%&gt;
  
          &lt;%= f.submit "Logga in", :class =&gt; 'login_submit btn btn-primary' %&gt;
      &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>config/routes.rb:</strong></p>
  
  <pre><code>get "home/index"
  
  resources :users
  resources :projects
  resources :tickets
  
  root :to =&gt; 'home#index'
  </code></pre>
  
  <p><strong>rake routes (that has to do with users):</strong></p>
  
  <pre><code>    users GET    /users(.:format)             users#index
            POST   /users(.:format)             users#create
   new_user GET    /users/new(.:format)         users#new
  edit_user GET    /users/:id/edit(.:format)    users#edit
       user GET    /users/:id(.:format)         users#show
            PUT    /users/:id(.:format)         users#update
            DELETE /users/:id(.:format)         users#destroy
  </code></pre>
  
  <p>I'm new to Rails but find it strange that it complains that the route doesn't exist because the action "show" is to be found inside the user controller.</p>
  
  <p>The other thing I'm wondering about is why it looks for the action "show", while it should be "login" in this case?</p>
  
  <p>Why is this happening and what shall I do?</p>