lib/looksist/hashed.rb in looksist-0.2.6 vs lib/looksist/hashed.rb in looksist-0.2.7
- old
+ new
@@ -57,10 +57,10 @@
end
def inject_attributes_for(arry_of_hashes, opts)
entity_name = __entity__(opts[:bucket_name] || opts[:using])
keys = (arry_of_hashes.collect { |i| i[opts[:using]] }).compact.uniq
- values = keys.zip(Looksist.redis_service.send("#{entity_name}_for", keys)).to_h
+ values = Hash[keys.zip(Looksist.redis_service.send("#{entity_name}_for", keys))]
arry_of_hashes.each do |elt|
elt[opts[:populate]] = values[elt[opts[:using]]]
end
end
end