lib/pg_search/document.rb in pg_search-0.5.1 vs lib/pg_search/document.rb in pg_search-0.5.2
- old
+ new
@@ -1,7 +1,6 @@
require "logger"
-require "pg_search/scope"
module PgSearch
class Document < ActiveRecord::Base
include PgSearch
self.table_name = 'pg_search_documents'
@@ -17,12 +16,13 @@
pg_search_scope :search, lambda { |*args|
options = if PgSearch.multisearch_options.respond_to?(:call)
PgSearch.multisearch_options.call(*args)
else
- PgSearch.multisearch_options.reverse_merge(:query => args.first)
+ {:query => args.first}.merge(PgSearch.multisearch_options)
end
- options.reverse_merge(:against => :content)
+
+ {:against => :content}.merge(options)
}
private
def update_content