Class: TaoForm::Components::Select::MultipleResultComponent

Inherits:
ResultComponent show all
Defined in:
lib/tao_form/components/select/multiple_result_component.rb

Instance Attribute Summary

Attributes inherited from ResultComponent

#choices, #html_options

Attributes inherited from FieldComponent

#attribute_name, #builder

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ResultComponent

#initialize

Methods inherited from FieldComponent

#initialize

Constructor Details

This class inherits a constructor from TaoForm::Components::Select::ResultComponent

Class Method Details

.component_nameObject



16
17
18
# File 'lib/tao_form/components/select/multiple_result_component.rb', line 16

def self.component_name
  :multiple_select_result
end

Instance Method Details

#render(&block) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/tao_form/components/select/multiple_result_component.rb', line 6

def render &block
  if block_given?
    super
  else
    super {
      builder.select attribute_name, choices, options, {multiple: true}
    }
  end
end