Module: ShareLayouts::Controllers::ActionController::ClassMethods

Defined in:
lib/share_layouts/controllers/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#radiant_layout(name = nil, options = {}, &block) ⇒ Object

Raises:

  • (ArgumentError)


10
11
12
13
14
15
# File 'lib/share_layouts/controllers/action_controller.rb', line 10

def radiant_layout(name=nil, options={}, &block)
  raise ArgumentError, "A layout name or block is required!" unless name || block
  write_inheritable_attribute 'radiant_layout', name || block
  before_filter :set_radiant_layout
  layout 'radiant', options
end