title: named routes with devise in Rails 3 haml view
body: <p>from rake routes I get this in my application</p>
  
  <pre><code>                 new_admin_session GET    /admins/sign_in(.:format)                     {:controller=&gt;"devise/sessions", :action=&gt;"new"}
                       admin_session POST   /admins/sign_in(.:format)                     {:controller=&gt;"devise/sessions", :action=&gt;"create"}
               destroy_admin_session GET    /admins/sign_out(.:format)                    {:controller=&gt;"devise/sessions", :action=&gt;"destroy"}
                      admin_password POST   /admins/password(.:format)                    {:controller=&gt;"devise/passwords", :action=&gt;"create"}
                  new_admin_password GET    /admins/password/new(.:format)                {:controller=&gt;"devise/passwords", :action=&gt;"new"}
                 edit_admin_password GET    /admins/password/edit(.:format)               {:controller=&gt;"devise/passwords", :action=&gt;"edit"}
                      admin_password PUT    /admins/password(.:format)                    {:controller=&gt;"devise/passwords", :action=&gt;"update"}
                  admin_registration POST   /admins(.:format)                             {:controller=&gt;"devise/registrations", :action=&gt;"create"}
              new_admin_registration GET    /admins/sign_up(.:format)                     {:controller=&gt;"devise/registrations", :action=&gt;"new"}
             edit_admin_registration GET    /admins/edit(.:format)                        {:controller=&gt;"devise/registrations", :action=&gt;"edit"}
                  admin_registration PUT    /admins(.:format)                             {:controller=&gt;"devise/registrations", :action=&gt;"update"}
                  admin_registration DELETE /admins(.:format)                             {:controller=&gt;"devise/registrations", :action=&gt;"destroy"}
                    new_user_session GET    /users/sign_in(.:format)                      {:controller=&gt;"devise/sessions", :action=&gt;"new"}
                        user_session POST   /users/sign_in(.:format)                      {:controller=&gt;"devise/sessions", :action=&gt;"create"}
                destroy_user_session GET    /users/sign_out(.:format)                     {:controller=&gt;"devise/sessions", :action=&gt;"destroy"}
                       user_password POST   /users/password(.:format)                     {:controller=&gt;"devise/passwords", :action=&gt;"create"}
                   new_user_password GET    /users/password/new(.:format)                 {:controller=&gt;"devise/passwords", :action=&gt;"new"}
                  edit_user_password GET    /users/password/edit(.:format)                {:controller=&gt;"devise/passwords", :action=&gt;"edit"}
                       user_password PUT    /users/password(.:format)                     {:controller=&gt;"devise/passwords", :action=&gt;"update"}
                   user_registration POST   /users(.:format)                              {:controller=&gt;"devise/registrations", :action=&gt;"create"}
               new_user_registration GET    /users/sign_up(.:format)                      {:controller=&gt;"devise/registrations", :action=&gt;"new"}
              edit_user_registration GET    /users/edit(.:format)                         {:controller=&gt;"devise/registrations", :action=&gt;"edit"}
                   user_registration PUT    /users(.:format)                              {:controller=&gt;"devise/registrations", :action=&gt;"update"}
                   user_registration DELETE /users(.:format)                              {:controller=&gt;"devise/registrations", :action=&gt;"destroy"}
                                root        /(.:format)                                   {:controller=&gt;"devise/sessions", :action=&gt;"new"}
          change_authorization_rules GET    /authorization_rules/change(.:format)         {:controller=&gt;"authorization_rules", :action=&gt;"change"}
  suggest_change_authorization_rules GET    /authorization_rules/suggest_change(.:format) {:controller=&gt;"authorization_rules", :action=&gt;"suggest_change"}
           graph_authorization_rules GET    /authorization_rules/graph(.:format)          {:controller=&gt;"authorization_rules", :action=&gt;"graph"}
                 authorization_rules GET    /authorization_rules(.:format)                {:controller=&gt;"authorization_rules", :action=&gt;"index"}
                authorization_usages GET    /authorization_usages(.:format)               {:controller=&gt;"authorization_usages", :action=&gt;"index"}
  </code></pre>
  
  <p>In a haml view I do</p>
  
  <pre><code>%html
  %head
    %title="Devise Demo"
    = stylesheet_link_tag :all 
    = javascript_include_tag :defaults 
    = csrf_meta_tag 
  %body
    %p.notice=notice
    %p.alert=alert
    - if current_user
      = "Hello #{current_user.email}  ("
      = link_to 'Not you?', destroy_admin_session
      = ")"
  </code></pre>
  
  <p>but I get the error </p>
  
  <pre><code>undefined local variable or method `destroy_admin_session' for #&lt;#&lt;Class:0x7f66ce2d3610&gt;:0x7f66ce2cd1c0&gt;
  </code></pre>
  
  <p>I'm obviously missing the abvious about named routes in Rails 3</p>
  
  <p>Brad</p>