Class: VCFB::Tags::CollectionCheckBoxes::CheckBoxBuilder

Inherits:
ActionView::Helpers::Tags::CollectionCheckBoxes::Builder
  • Object
show all
Includes:
VCFB::Tags::CollectionHelpers
Defined in:
lib/vcfb/tags/collection_check_boxes.rb

Overview

Override the #label and #check_box methods to render via component

Instance Method Summary collapse

Instance Method Details

#check_box(extra_html_options = {}) ⇒ Object



12
13
14
15
16
17
# File 'lib/vcfb/tags/collection_check_boxes.rb', line 12

def check_box(extra_html_options = {})
  html_options = extra_html_options.merge(@input_html_options)
  html_options[:multiple] = true
  html_options[:skip_default_ids] = false
  form.collection_check_boxes_check_box(@method_name, html_options, @value, nil)
end

#label(extra_html_options = {}, &block) ⇒ Object



8
9
10
# File 'lib/vcfb/tags/collection_check_boxes.rb', line 8

def label(extra_html_options = {}, &block)
  form.collection_check_boxes_label(@sanitized_attribute_name, @text, label_html_options(extra_html_options), &block)
end