Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Use Hash[] instead of DataMapper::Ext::Array.to_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
dkubb committed Mar 23, 2011
1 parent dd9d95b commit 3f6c251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ferret_adapter/adapter.rb
Expand Up @@ -32,7 +32,7 @@ def read(query)
ferret_query = dm_query_to_ferret_query(query)

@index.search(ferret_query, :limit => query.limit).map do |lazy_doc|
DataMapper::Ext::Array.to_hash(fields.map { |p| [ p, p.typecast(lazy_doc[p.field]) ] }).update(
Hash[ fields.map { |p| [ p, p.typecast(lazy_doc[p.field]) ] } ].update(
key.field => key.typecast(lazy_doc[:id])
)
end
Expand Down

0 comments on commit 3f6c251

Please sign in to comment.