Skip to content

Commit

Permalink
putting the right syntax for the mongoid adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
maleko committed Aug 23, 2010
1 parent 3c9714c commit 58300ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pickle/adapters/mongoid.rb
Expand Up @@ -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)
Expand Down

0 comments on commit 58300ef

Please sign in to comment.