Module: Trailblazer::Cell::Layout

Included in:
Trailblazer::Cell
Defined in:
lib/trailblazer/cell.rb

Instance Method Summary collapse

Instance Method Details

#render(options = {}) ⇒ Object



45
46
47
48
# File 'lib/trailblazer/cell.rb', line 45

def render(options={})
  options[:layout] = @options[:layout] if @options[:layout]
  super
end

#with_layout(options, content) ⇒ Object



50
51
52
53
# File 'lib/trailblazer/cell.rb', line 50

def with_layout(options, content)
  return content unless layout = options[:layout]
  layout.new(model, parent_controller: parent_controller, content: content) # TODO: test parent_controller.
end