Sha256: a76fdf3758c7903dc8eeb640db2e839d0c0f54a86258a8b52542a2928f06d999
Contents?: true
Size: 466 Bytes
Versions: 2
Compression:
Stored size: 466 Bytes
Contents
module Trailblazer::Rails::Controller::Cell private module Render def render(cell = nil, options = {}, *, &block) return super unless cell.kind_of?(::Cell::ViewModel) render_cell(cell, options) end def render_cell(cell, options) options = options.reverse_merge(layout: true) # render the cell. content = cell.() render({ html: content }.merge(options)) end end include Render end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trailblazer-rails-2.1.4 | lib/trailblazer/rails/cell.rb |
trailblazer-rails-2.1.2 | lib/trailblazer/rails/cell.rb |