Created
November 25, 2010 17:15
-
-
Save ahamid/715653 to your computer and use it in GitHub Desktop.
Conditional layout with devise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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