Class: CriteriaOperator::UiComponent::CriteriaEditorCell

Inherits:
BaseCell
  • Object
show all
Defined in:
app/cells/criteria_operator/ui_component/criteria_editor_cell.rb

Instance Method Summary collapse

Instance Method Details

#choose_template(options = {}) ⇒ Object



14
15
16
17
18
19
20
# File 'app/cells/criteria_operator/ui_component/criteria_editor_cell.rb', line 14

def choose_template(options = {})
  if model.kind_of? BinaryOperator
    ExpressionCell.call(model).call(:show, options)
  else
    GroupCell.call(model).call(:show, options)
  end
end

#show(options = {}) ⇒ Object



7
8
9
10
11
12
# File 'app/cells/criteria_operator/ui_component/criteria_editor_cell.rb', line 7

def show(options = {})
  @input_id = options[:id] if options.has_key? :id
  @input_name = options[:name] if options.has_key? :name
  # TODO: provide support for read_only
  render
end