Skip to content

Commit

Permalink
[FIX] Remove @options.delete in Tire::Search::Search#to_hash so the…
Browse files Browse the repository at this point in the history
… call is not destructive

Closes karmi#460.
  • Loading branch information
karmi committed Oct 18, 2012
1 parent 6fef487 commit cb30f52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tire/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def to_curl
end

def to_hash
@options.delete(:payload) || begin
@options[:payload] || begin
request = {}
request.update( { :indices_boost => @indices_boost } ) if @indices_boost
request.update( { :query => @query.to_hash } ) if @query
Expand Down

0 comments on commit cb30f52

Please sign in to comment.