app/volt/tasks/live_query/data_store.rb in volt-0.7.16 vs app/volt/tasks/live_query/data_store.rb in volt-0.7.17

- old
+ new

@@ -5,8 +5,17 @@ @@mongo_db ||= Mongo::MongoClient.new("localhost", 27017) @@db ||= @@mongo_db.db("development") end def query(collection, query) + puts "QUERY: #{collection} - #{query.inspect}" + + query = query.dup + query.keys.each do |key| + if key =~ /_id$/ + query[key] = BSON::ObjectId(query[key]) + end + end + @@db[collection].find(query).to_a end end