class ActiveScaffold::Config::Search
Attributes
the ActionLink for this action
whether submits the search as you type
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
Public Class Methods
Source
# File lib/active_scaffold/config/search.rb, line 5 def initialize(core_config) super @text_search = self.class.text_search @live = self.class.live? @split_terms = self.class.split_terms @reset_form = self.class.reset_form end
Calls superclass method
ActiveScaffold::Config::Base::new
Public Instance Methods
Source
# File lib/active_scaffold/config/search.rb, line 43 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 defined? @columns self.columns = @core.columns.filter_map { |c| c.name if @core.columns._inheritable.include?(c.name) && c.searchable? && c.association.nil? && c.text? } end @columns end
provides access to the list of columns specifically meant for the Search
to use