Skip to content

Commit

Permalink
fix id look up for non-string ids
Browse files Browse the repository at this point in the history
  • Loading branch information
khaled committed Mar 30, 2011
1 parent 1dbcda9 commit abfa262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid_sphinx/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def document_ids
end

def document_map
@document_map = model.find(document_ids).inject({}) { |memo, d| memo[d.id] = d; memo }
@document_map = model.find(document_ids).inject({}) { |memo, d| memo[d.id.to_s] = d; memo }
end

def total_pages
Expand Down

0 comments on commit abfa262

Please sign in to comment.