OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/helpers/cells_helper.rb

14 lines
421 B

module CellsHelper
##
# Use this to render cells directly as the view for a controller
# instead of a standard rails view.
def render_cell(name, model, opts = {})
opts[:context] = { controller: self } if is_a? ActionController::Base
render_options = opts.delete(:render_options) || {}
cell = cell(name, model, opts)
rendered = cell.call
render render_options.merge(text: rendered)
end
end