Class: ProductLineGroupsPickerTomSelectInput

Inherits:
TomSelectInput
  • Object
show all
Defined in:
app/inputs/product_line_groups_picker_tom_select_input.rb

Overview

Product Line Groups Picker Tom Select Input.

Instance Method Summary collapse

Methods inherited from TomSelectInput

#input, #input_html_classes

Instance Method Details

#collectionObject



4
5
6
7
8
9
# File 'app/inputs/product_line_groups_picker_tom_select_input.rb', line 4

def collection
  ProductLine.where.not(lineage_expanded: nil).map do |pl|
    group = pl.lineage_expanded.split('>').first.strip
    [group, group]
  end.uniq.sort
end