Method: Cells::Rails::ActionController#render_cell
- Defined in:
- lib/cells/rails.rb
#render_cell(name, state, *args, &block) ⇒ Object
Renders the cell state and returns the content. You may pass options here, too. They will be around in @opts.
Example:
@box = render_cell(:posts, :latest, :user => current_user)
If you need the cell instance before it renders, you can pass a block receiving the cell.
Example:
@box = render_cell(:comments, :top5) do |cell|
cell.markdown! if config.parse_comments?
end
31 32 33 |
# File 'lib/cells/rails.rb', line 31 def render_cell(name, state, *args, &block) ::Cell::Rails.render_cell_for(name, state, self, *args, &block) end |