vendor/gems/schof-searchlogic-0.0.2/lib/searchlogic/active_record/base.rb
# This is an alias method chain. It hook into ActiveRecord's "calculate" method and checks to see if Searchlogic should get involved.
This is an alias method chain. It hook into ActiveRecord's "calculate" method and checks to see if Searchlogic should get involved.
This is an alias method chain . It hook into ActiveRecord ' s " calculate " method and checks to see if Searchlogic should get involved .
def filter_options_with_searchlogic(options = {}, searching = true)
          return options unless Searchlogic::Search::Base.needed?(self, options)
          search = Searchlogic::Search::Base.create_virtual_class(self).new 
          search.acting_as_filter = true
          search.scope = scope(:find)
          conditions = options.delete(:conditions) || options.delete("conditions") || {}
          if conditions
            case conditions
            when Hash
              conditions.each { |condition, value| search.conditions.send("#{condition}=", value) } 
            else
              search.conditions = conditions
            end
          end
          search.options = options
          search.sanitize(searching)
        end
def filter_options_with_searchlogic ( options = { } , searching = true ) return options unless Searchlogic :: Search :: Base . needed? ( self , options ) search = Searchlogic :: Search :: Base . create_virtual_class ( self ) . new search . acting_as_filter = true search . scope = scope ( :find ) conditions = options . delete ( :conditions ) || options . delete ( "conditions" ) || { } if conditions case conditions when Hash conditions . each { | condition , value | search . conditions . send ( "#{condition}=" , value ) } else search . conditions = conditions end end search . options = options search . sanitize ( searching ) end
This is an alias method chain.
This is an alias method chain .
# call explicitly to avoid merging the scopes into the search # explicitly call to enforce blanks
options
<not_specific>
searching
<not_specific>