Class: FormProps::Inputs::CollectionCheckBoxes::CheckBoxBuilder

Inherits:
Builder
  • Object
show all
Defined in:
lib/form_props/inputs/collection_check_boxes.rb

Instance Method Summary collapse

Instance Method Details

#render(extra_html_options = {}) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/form_props/inputs/collection_check_boxes.rb', line 14

def render(extra_html_options = {})
  html_options = extra_html_options.merge(@input_html_options)
  html_options[:multiple] = true
  html_options[:skip_default_ids] = false

  checkbox = CheckBox.new(@object_name, @method_name, @template_object, @value, nil, html_options)
  checkbox.render(true)
  checkbox.json.label @text
end