mongoid/mongoid — pull request #2490 by theycallmeswift (2012-10-20 05:40:40+00:00)
Title: The `first` finder should accept conditions for matching

In the 2.x branch of mongoid, the `.first` finder accepted a hash of conditions to apply when finding the first match. In the new 3.x branch, that functionality was removed, making mongoid incompatible with some popular gems like factory girl. I added the removed functionality back in.

https://github.com/mongoid/mongoid/blob/2.5.0-stable/lib/mongoid/finders.rb#L121-123
https://github.com/mongoid/mongoid/blob/master/lib/mongoid/finders.rb#L138-140