Skip to content

Instantly share code, notes, and snippets.

@edthix
Created April 13, 2012 12:22
Show Gist options
  • Save edthix/2376586 to your computer and use it in GitHub Desktop.
Save edthix/2376586 to your computer and use it in GitHub Desktop.
remove devise sign in layout
# apply to application_controller.rb
# add to before_filter
before_filter ....., :remove_sign_in_layout
def remove_sign_in_layout
if params[:controller] == 'devise/sessions'
render :layout => nil
end
end
@faizalheesyam
Copy link

This works by disabling everything under /sessions.. Somehow it makes the session/create failed coz no template for it, and theres no need a template for creating session. So i just add more condition, which is check for the controller name AND action=='new', now it works. Thanks!

@edthix
Copy link
Author

edthix commented May 18, 2012

Oh yeah, forgot to put conditions for actions. Coded in a hurry :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment