ianwhite/orm_adapter — Issue #9: mongoid master (3.0.0) removes klass.first(:conditions...)
Author: fwoeck
Created: 2012-01-10 08:17:42+00:00
State: open

Hi,

the new mongoid master removes any options from klass.first, so line 32 in
lib/orm_adapter/adapters/mongoid.rb fails.

Changing

```ruby
# @see OrmAdapter::Base#get
def get(id)
klass.first(:conditions => { :id => wrap_key(id) })
end
```

to

```ruby
# @see OrmAdapter::Base#get
def get(id)
klass.where(:_id => wrap_key(id)).first
end
```

should work.
Best regards,
Frank