title: Devise Layouts for SignedIn & Signed Out resources
body: <p>My App has two UI states:
   - Signed IN
   - Signed Out</p>
  
  <p>I've been using the following to determine which app/view/layout to use based on if the user is signed in or out with Devise:</p>
  
  <pre><code>  # Devise, way of using a different Layout for all the devise/non-signed in Views
    layout :layout_by_resource
    def layout_by_resource
      if devise_controller?
        "application_unauthorized"
      else
        "application"
      end
    end
  </code></pre>
  
  <p>The problem is once your signed in it uses the wrong layout? ideas?</p>
  
  <p>I only want to use "application_unauthorized" if it's devise &amp; the user is not signed in.</p>