title: different layout for sign_in action in devise
body: <p>I'm trying to use a different/custom layout named "devise" for the sign_in action. I found <a href="https://github.com/plataformatec/devise/wiki/How-To:-Create-custom-layouts" rel="noreferrer">this</a> page in the devise wiki, and the second example even says you can do it per-action (in this case, <code>sign_in</code> action), but it shows no example of doing that. Someone on IRC told me I could try this:</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    protect_from_forgery
  
    layout :layout_by_resource
  
    def layout_by_resource
      if devise_controller? &amp;&amp; resource_name == :user &amp;&amp; action_name == 'sign_in'
        "devise"
      else
        "application"
      end
    end
  end
  </code></pre>
  
  <p>But it does not seem to be working as it's still loading the default application layout. I would appreciate any help.</p>