Class: PostalCodePickerInput

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

Overview

SimpleForm input wrapper: postal code picker.

Instance Method Summary collapse

Methods inherited from TomSelectInput

#collection, #input_html_classes

Instance Method Details

#input(wrapper_options = nil) ⇒ Object



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

def input(wrapper_options = nil)
  input_html_options[:data] ||= {}
  input_html_options[:data]['tom-select-suggest-url-value'] = template.postal_code_lookup_addresses_path(input_html_options[:query_params].presence || {})
  input_html_options[:data]['tom-select-min-chars-value'] = 2
  super
end