Class: VCFB::Tags::CollectionRadioButtons::RadioButtonBuilder

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

Overview

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

Instance Method Summary collapse

Instance Method Details

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



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

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

#radio_button(extra_html_options = {}) ⇒ Object



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

def radio_button(extra_html_options = {})
  html_options = extra_html_options.merge(@input_html_options)
  html_options[:skip_default_ids] = false
  form.collection_radio_buttons_radio_button(@method_name, @value, html_options)
end