Class: ProductLineGroupsPickerTomSelectInput
- Inherits:
-
TomSelectInput
- Object
- SimpleForm::Inputs::CollectionSelectInput
- TomSelectInput
- ProductLineGroupsPickerTomSelectInput
show all
- Defined in:
- app/inputs/product_line_groups_picker_tom_select_input.rb
Instance Method Summary
collapse
#input, #input_html_classes
Instance Method Details
#collection ⇒ Object
2
3
4
5
6
7
|
# File 'app/inputs/product_line_groups_picker_tom_select_input.rb', line 2
def collection
ProductLine.where.not(lineage_expanded: nil).map { |pl|
group = pl.lineage_expanded.split('>').first.strip
[group, group]
}.uniq.sort
end
|