Method: Cuca::Layout#initialize
- Defined in:
- lib/cuca/layout.rb
#initialize(params = {}, &block) ⇒ Layout
the controller will create the layout. The controller will also set the content_for_layout assign besides other assigns from the controller.
49 50 51 52 53 54 55 |
# File 'lib/cuca/layout.rb', line 49 def initialize(params = {}, &block) raise ArgumentError.new("Layout requires :assigns for layout content") if params[:assigns].nil? params[:assigns].each_pair do |k,v| instance_variable_set("@#{k.to_s}", v) end super end |