Class: CompositeInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- CompositeInput
- Defined in:
- app/inputs/composite_input.rb
Overview
Render Something Like This
<div class=“control-group composite optional foo_bar”>
</div>
Instance Method Summary collapse
Instance Method Details
#input ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/inputs/composite_input.rb', line 19 def input input_html_classes.unshift("string") [:type] ||= 'text' [:name] ||= "#{object_name}[#{attribute_name}]" markup = "" markup << field_wrapper_for('', nil) end |
#label ⇒ Object
27 28 29 30 31 |
# File 'app/inputs/composite_input.rb', line 27 def label [:elements].each_with_object('') {|element_name, html| html << element_label(element_name) } end |