Class: VCFB::Component::Base

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Callbacks
Defined in:
lib/vcfb/component/base.rb

Instance Method Summary collapse

Instance Method Details

#collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) ⇒ Object

Override the built-in methods to allow us to render custom collection tag builders that render using labels, check boxes, and radio buttons via components.



18
19
20
# File 'lib/vcfb/component/base.rb', line 18

def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
  VCFB::Tags::CollectionCheckBoxes.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
end

#collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) ⇒ Object



22
23
24
# File 'lib/vcfb/component/base.rb', line 22

def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
  VCFB::Tags::CollectionRadioButtons.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
end