Skip to content

Commit

Permalink
Prefer merge to reverse_merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nertzy committed Sep 2, 2012
1 parent 781d2c9 commit ea05d59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/pg_search/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Configuration
attr_reader :model

def initialize(options, model)
@options = options.reverse_merge(default_options)
@options = default_options.merge(options)
@model = model

assert_valid_options(@options)
Expand Down
5 changes: 3 additions & 2 deletions lib/pg_search/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ def self.logger
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
Expand Down

0 comments on commit ea05d59

Please sign in to comment.