Class: NestedSelectInput
- Inherits:
-
Formtastic::Inputs::StringInput
- Object
- Formtastic::Inputs::StringInput
- NestedSelectInput
- Defined in:
- app/inputs/nested_select_input.rb
Instance Method Summary collapse
Instance Method Details
#to_html ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/inputs/nested_select_input.rb', line 2 def to_html html_elems = [] for_each_level do |level_data| a = level_data[:attribute] set_parent_value(level_data) html_elems << builder.text_field(a, (level_data)) html_elems << builder.label(a, translated_attribute(a)) end input_wrapping do html_elems.reverse.join("\n").html_safe end end |