title: Ruby on rails "No route matches"
body: <p>I am new to Rails and am just implementing some basic applications.  Just starting on my second app and have run into what is a basic problem, but Google is yielding me nothing.</p>
  
  <p>Getting this error:</p>
  
  <pre><code>No route matches {:controller=&gt;"user", :action=&gt;"admin_login"}
  </code></pre>
  
  <p>Here is my routes.rb</p>
  
  <pre><code>Blah::Application.routes.draw do
    resources :items, :cart, :user
  end
  </code></pre>
  
  <p>Here is my <code>applications.html.erb</code> (the idea is this is a header of course, and I'm trying to create a link to 'login'.  Right now it's just supposed to set the 'login' session variable to '1'.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Blah&lt;/title&gt;
    &lt;%= stylesheet_link_tag :all %&gt;
    &lt;%= javascript_include_tag :defaults %&gt;
    &lt;%= csrf_meta_tag %&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="headerHolder"&gt;
      &lt;div id="title"&gt;blah&lt;/div&gt;
      &lt;div id="menu"&gt;
          &lt;div class ="menuItem"&gt;blog&lt;/div&gt;
          &lt;div class ="menuItem"&gt;
              &lt;%= link_to "products",  :controller =&gt; "items", 
                                       :action =&gt; "index" %&gt;
          &lt;/div&gt;
          &lt;div class ="menuItem"&gt;contact&lt;/div&gt;    
          &lt;div class="menuItem"&gt;
              &lt;%= link_to "cart",  :controller =&gt; "cart", 
                                   :action =&gt; "index" %&gt;
          &lt;/div&gt;
          &lt;div class="menuItem"&gt;
                  &lt;%= link_to_unless_current "admin", :controller =&gt; "user", 
                                                      :action =&gt; "admin_login" %&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="content"&gt;
      &lt;%= yield %&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is my user_controller.rb</p>
  
  <pre><code>class UserController &lt; ApplicationController
  
    def index
    end
  
    def admin_login
      session[:login] = 1
      session[:cart] = nil
      flash[:notice] = "Admin user successfully logged in, cart reset."
      redirect_to :controller =&gt; :items
    end
  
  end
  </code></pre>
  
  <p>What am i missing in my <code>routes.rb</code>? Or otherwise...am sure it's something daft.</p>