class ActiveScaffold::Config::Search
Attributes
link[RW]
the ActionLink for this action
live[W]
whether submits the search as you type
text_search[RW]
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
live?()
click to toggle source
# File lib/active_scaffold/config/search.rb, line 30 def self.live? @@live end
new(core_config)
click to toggle source
Calls superclass method
ActiveScaffold::Config::Base::new
# File lib/active_scaffold/config/search.rb, line 5 def initialize(core_config) super @text_search = self.class.text_search @live = self.class.live? end
Public Instance Methods
columns()
click to toggle source
provides access to the list of columns specifically meant for the Search
to use
# File lib/active_scaffold/config/search.rb, line 38 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.collect{|c| c.name if @core.columns._inheritable.include?(c.name) and c.searchable? and c.column and c.column.text?}.compact end @columns end
live?()
click to toggle source
# File lib/active_scaffold/config/search.rb, line 61 def live? @live end