Skip to content

Instantly share code, notes, and snippets.

@ahamid ahamid/gist:715653
Created Nov 25, 2010

Embed
What would you like to do?
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
You can’t perform that action at this time.