title: Devise - Recoverable (Password Reset)
body: <p>I am trying to allow the user to reset their password using Devise's <strong>recoverable</strong> option. This doesn't seem to be working for me.</p>
  
  <p>I extend the <code>Devise::PasswordsController</code> so that it doesn't use the application layout.</p>
  
  <pre><code>class PasswordsController &lt; Devise::PasswordsController
    layout false
  end
  </code></pre>
  
  <p>In my routes, I ensure that my passwords controller is used.</p>
  
  <pre><code>devise_for :users, :controllers =&gt; {:passwords =&gt; "passwords"}
  resources :passwords
  </code></pre>
  
  <p>Here's my User model so you see that I have the <code>:recoverable</code> option.</p>
  
  <pre><code>devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :trackable, :validatable
  </code></pre>
  
  <p>On my login page, I have (I'm using haml):</p>
  
  <pre><code>...
  = link_to "Forgot your password?", new_password_path(resource_name)
  </code></pre>
  
  <p>This link correctly takes me to <code>http://localhost:3000/users/password/new</code>.Here is the form that is found there:</p>
  
  <pre><code>%h2 Forgot your password?
  = form_for(resource, as: resource_name, url: password_path(resource_name), html: { :method =&gt; :post }) do |f|
    = devise_error_messages!
    %div
      = f.label :email
      %br/
      = f.email_field :email
    %div= f.submit "Send me reset password instructions"
  </code></pre>
  
  <p>However, this seems to try to take me to the wrong place when I click the button. It's failing every time, and not showing any emails in the server log.</p>
  
  <p>It's redirecting me to: <code>http://localhost:3000/passwords/user</code> and telling me:</p>
  
  <p><strong>Routing Error</strong></p>
  
  <pre><code>No route matches "/passwords/user"
  </code></pre>
  
  <p>Any idea how I can proceed? I thought using the <strong>recoverable</strong> option was meant to be easier than this. What am I doing wrong?</p>
  
  <p><strong>UPDATE</strong>
  For the record, I just removed everything I did, and tried using the standard devise controllers, and I modified my application layout so that it wouldn't cause an error, and everything is working. So I just need a good way to remove the application layout from the password reset page. </p>