Class: SupplierPickerInput
- Inherits:
-
TomSelectInput
- Object
- SimpleForm::Inputs::CollectionSelectInput
- TomSelectInput
- SupplierPickerInput
- Defined in:
- app/inputs/supplier_picker_input.rb
Instance Method Summary collapse
Methods inherited from TomSelectInput
Instance Method Details
#collection ⇒ Object
8 9 10 |
# File 'app/inputs/supplier_picker_input.rb', line 8 def collection Supplier.where(id: selected_value.to_i).map { |r| [r.to_s, r.id] } end |
#input(wrapper_options = nil) ⇒ Object
2 3 4 5 6 |
# File 'app/inputs/supplier_picker_input.rb', line 2 def input( = nil) [:data] ||= {} [:data]['tom-select-suggest-url-value'] = template.lookup_parties_by_category_path(search_for: 'supplier') super() end |