Skip to content

Instantly share code, notes, and snippets.

@rduarte
Forked from josevalim/application_controller.rb
Created April 29, 2010 11:33
Show Gist options
  • Save rduarte/383474 to your computer and use it in GitHub Desktop.
Save rduarte/383474 to your computer and use it in GitHub Desktop.
# How to give your devise controllers all the same layout (e.g. "authentication" below)
class ApplicationController < ActionController::Base
layout :setup_layout
protected
def setup_layout
devise_controller? ? "authentication" : "application"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment