lib/pickle/adapters/mongoid.rb in pickle-0.4.1 vs lib/pickle/adapters/mongoid.rb in pickle-0.4.2

- old
+ new

@@ -25,17 +25,17 @@ klass.find(id) end # Find the first instance matching conditions def self.find_first_model(klass, conditions) - klass.first(conditions) + klass.first(:conditions => conditions) end # Find all models matching conditions def self.find_all_models(klass, conditions) - klass.all(conditions) + klass.all(:conditions => conditions) end - + # Create a model with given attributes def self.create_model(klass, attributes) klass.create!(attributes) end end