default search params #default_params = {:title => {“from”=>“test”, “to”=>“”, “opt”=>“%?%”}}
human conditions instead of just filtered you may show the user a humanized search condition statment
the ActionLink for this action
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
provides access to the list of columns specifically meant for the Search to use
# File lib/active_scaffold/config/field_search.rb, line 39 def columns # we want to delay initializing to the @core.columns set for as long as possible. Too soon and .search_sql will not be available to .searchable? unless @columns self.columns = @core.columns._inheritable self.columns.exclude @core.columns.active_record_class.locking_column.to_sym end @columns end
# File lib/active_scaffold/config/field_search.rb, line 66 def optional_columns @optional_columns ||= [] end
rarely searched columns may be placed in a hidden subgroup
# File lib/active_scaffold/config/field_search.rb, line 62 def optional_columns=(optionals) @optional_columns = Array(optionals) end
# File lib/active_scaffold/config/field_search.rb, line 5 def initialize(core_config) super @text_search = self.class.text_search @human_conditions = self.class.human_conditions # start with the ActionLink defined globally @link = self.class.link.clone end