Parent

Files

Class/Module Index [+]

Quicksearch

ActiveScaffold::Config::Search

Attributes

live[W]

whether submits the search as you type

split_terms[RW]
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 33
def self.live?
  @@live
end
new(core_config) click to toggle 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

  # start with the ActionLink defined globally
  @link = self.class.link.clone
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 44
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 69
def live?
  @live
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.