title: Customizing devise layouts for registrations vs. passwords
body: <p>I have an application that uses devise for authentication.  I am trying to customize the layouts for the devise controller, and I was able to do some of this by following the answers to another question here on Stack Overflow.  However, I can't find anything about how to distinguish between the devise/passwords and devise/registrations controller.  I am using the following code:</p>
  
  <pre><code>def layout_by_resource
  if devise_controller?
        if action_name == "edit" or action_name == "update"
          "application"
        else
          "sessions"
        end
  else
        "application"
  end
  end
  </code></pre>
  
  <p>The problem is that when a user tries to re-set their password, it's trying to use the application layout (since the action is edit).  I need it to use the sessions layout.  Can anyone help me figure out how to make that happen?</p>