Class: Uchi::Field::Select::Edit
- Inherits:
-
Base::Edit
- Object
- ViewComponent::Base
- Base::Component
- Base::Edit
- Uchi::Field::Select::Edit
- Defined in:
- app/components/uchi/field/select.rb
Instance Attribute Summary
Attributes inherited from Base::Edit
Attributes inherited from Base::Component
Instance Method Summary collapse
Methods inherited from Base::Edit
Methods inherited from Base::Component
Constructor Details
This class inherits a constructor from Uchi::Field::Base::Edit
Instance Method Details
#collection ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/components/uchi/field/select.rb', line 7 def collection if field.grouped? field..map { |group, | [group, .map { |value, label| [label, value] }] } else field..map { |value, label| [label, value] } end end |