Skip to content

Commit

Permalink
Removed unnecessary self
Browse files Browse the repository at this point in the history
  • Loading branch information
eddloschi committed Nov 8, 2013
1 parent 6edc368 commit 28b82e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid/giza.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def search(&block)
search.indexes = @sphinx_indexes.join(" ")
search.instance_eval(&block)
results = search.run
results.each { |result| result[self.name.to_sym] = self.in(giza_id: result[:matches].map { |match| match[:doc] }) }
results.each { |result| result[name.to_sym] = self.in(giza_id: result[:matches].map { |match| match[:doc] }) }
results.length > 1 ? results : results.first
end
end
Expand Down

0 comments on commit 28b82e5

Please sign in to comment.