-
Notifications
You must be signed in to change notification settings - Fork 329
API: FieldSearch
The FieldSearch action is an advanced search. Enables to set the value to search for each searchable field.
The set of searchable columns. This list defaults to the textual database fields.
Active scaffold supports html, js, json, yaml, and xml formats by default. If you need to add another mime type for field search you can do it here. The format is then added to the default formats.
Examples:
config.field_search.formats << :pdf or config.field_search.formats = [:pdf]
A flag for whether the search should do full-text searching in the database (LIKE ?) or assume that search tokens will match the beginning (LIKE ?%). Default is :true.
The action link used to tie the Search box to the List table. See API: Action Link for the options on this setting.
To customize the search form columns use search_ui similar to form_ui. Note that we can’t use a :checkbox search_ui because it’s not posible to determine wheater to search for that field or not (:checkbox will silently render a :select)
Examples:
config.columns[:user].search_ui = :select
A flag for how the search should do full-text searching in the database:
- :full (LIKE %?%)
- :start (LIKE ?%%)
- :end (LIKE %%?)
- false (LIKE ?)
Default is :full
.