Module: Cell::RailsExtensions::ActionController

Defined in:
lib/cell/rails.rb

Instance Method Summary collapse

Instance Method Details

#cell(name, model = nil, options = {}, constant = ::Cell::ViewModel, &block) ⇒ Object


11
12
13
14
15
16
# File 'lib/cell/rails.rb', line 11

def cell(name, model=nil, options={}, constant=::Cell::ViewModel, &block)
  options[:context] ||= {}
  options[:context][:controller] = self

  constant.cell(name, model, options, &block)
end

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


18
19
20
# File 'lib/cell/rails.rb', line 18

def concept(name, model=nil, options={}, &block)
  cell(name, model, options, ::Cell::Concept, &block)
end