Skip to content
scambra edited this page Sep 14, 2010 · 12 revisions

The LiveSearch action is the same as Search except that it automatically submits the search conditions to the server as you type. This has an upside and a downside: it provides more feedback to the user (they can see the search working), but it can be inefficient with server resources.

columns local

The set of searchable columns. This list defaults to the textual database fields.

formats

Active scaffold supports html, js, json, yaml, and xml formats by default. If you need to add another mime type for live search you can do it here. The format is then added to the default formats.

Examples:

config.live_search.formats << :pdf
or
config.live_search.formats = [:pdf]

text_search global local

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.

link global

The action link used to tie the Search box to the List table. See API: Action Link for the options on this setting.

Clone this wiki locally