Skip to content

Instantly share code, notes, and snippets.

@ahamid
Created November 25, 2010 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahamid/715653 to your computer and use it in GitHub Desktop.
Save ahamid/715653 to your computer and use it in GitHub Desktop.
Conditional layout with devise
class ApplicationController < ActionController::Base
layout :layout_by_resource
# choose different layout for devise
def layout_by_resource
if devise_controller?
"users"
else
"application"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment