Module: SearchAutocomplete::Autocompletable::ClassMethods
- Defined in:
- lib/search_autocomplete/autocompletable.rb
Overview
Autocompletable methods
Instance Method Summary collapse
-
#autocomplete(search_field, display_fields = [], filters = []) ⇒ Object
Configures this model to respond to autocomplete searches.
Instance Method Details
#autocomplete(search_field, display_fields = [], filters = []) ⇒ Object
Configures this model to respond to autocomplete searches
22 23 24 25 26 27 28 29 |
# File 'lib/search_autocomplete/autocompletable.rb', line 22 def autocomplete(search_field, display_fields = [], filters = []) self. = { configured: true, search_field: search_field, display_fields: display_fields.size.zero? ? [search_field] : display_fields, filters: filters } end |