Skip to content
Browse files

putting the right syntax for the mongoid adapter

  • Loading branch information...
1 parent 3c9714c commit 58300efd548c3c6073981e2bb3b3d63df4742e56 @maleko maleko committed Aug 24, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/pickle/adapters/mongoid.rb
View
6 lib/pickle/adapters/mongoid.rb
@@ -27,14 +27,14 @@ def self.get_model(klass, id)
# 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)

0 comments on commit 58300ef

Please sign in to comment.
Something went wrong with that request. Please try again.