Skip to content

Instantly share code, notes, and snippets.

@boborchard
Created November 21, 2013 01:12
Show Gist options
  • Save boborchard/7574305 to your computer and use it in GitHub Desktop.
Save boborchard/7574305 to your computer and use it in GitHub Desktop.
Use a different layout for Devise User Auth than standard template
class ApplicationController < ActionController::Base
layout :layout_by_resource
def layout_by_resource
# If user isn't signed in or is on the main devise controllers, we'll use a different layout
if devise_controller? && resource_name == :user && action_name == 'new'
"devise"
else
"application"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment