Skip to content

Instantly share code, notes, and snippets.

@seanhandley
Last active January 12, 2016 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanhandley/11c4984bb2cba9d22966 to your computer and use it in GitHub Desktop.
Save seanhandley/11c4984bb2cba9d22966 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
def no_layout?
params.keys.include?('no_layout')
end
end
class OtherController < ApplicationController
layout 'my_layout'
layout nil, if: :no_layout?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment