vendor/gems/schof-searchlogic-0.0.2/lib/searchlogic/active_record/base.rb
# This is a special method that Searchlogic adds in. It returns a new search object on the model. So you can search via an object.
#
# <b>This method is "protected". Meaning it checks the passed options for SQL injections. So trying to write raw SQL in *any* of the option will result in a raised exception. It's safe to pass a params object when instantiating.</b>
#
# This method has an alias "new_search"
#
# === Examples
#
#   search = User.new_search
#   search.conditions.first_name_contains = "Ben"
#   search.per_page = 20
#   search.page = 2
#   search.order_by = {:user_group => :name}
#   search.all # can call any search method: first, find(:all), find(:first), sum("id"), etc...
This is a special method that Searchlogic adds in. It returns a new search object on the model. So you can search via an object.
This method is "protected". Meaning it checks the passed options for SQL injections. So trying to write raw SQL in *any* of the option will result in a raised exception. It's safe to pass a params object when instantiating.

This method has an alias "new_search"

Examples


This is a special method that Searchlogic adds in . It returns a new search object on the model . So you can search via an object . This method is " protected " . Meaning it checks the passed options for SQL injections . So trying to write raw SQL in * any * of the option will result in a raised exception . It ' s safe to pass a params object when instantiating . This method has an alias " new_search " Examples
def build_search(options = {}, &block)
        search = searchlogic_search
        search.protect = true
        search.options = options
        yield search if block_given?
        search
      end
def build_search ( options = { } , & block ) search = searchlogic_search search . protect = true search . options = options yield search if block_given? search end
This is a special method that Searchlogic adds in.
This is a special method that Searchlogic adds in .
options
<not_specific>
block
<not_specific>