Module: Sphinxsearchlogic::Search::Implementation
- Defined in:
- lib/sphinxsearchlogic.rb
Instance Method Summary collapse
Instance Method Details
#sphinxsearchlogic(conditions = {}, pagination = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/sphinxsearchlogic.rb', line 10 def sphinxsearchlogic(conditions = {}, pagination = {}) conditions ||= {} # params[:search] might be nil conditions.merge!(pagination) # Merge array of hashes, but doesn't work if Hash value is an Array. # conditions = Hash[*args.collect {|h| h.to_a}.flatten] Search.new(self, scope(:find), conditions) end |