lib/sorcery/model/adapters/mongoid.rb in sorcery-0.7.0 vs lib/sorcery/model/adapters/mongoid.rb in sorcery-0.7.1

- old
+ new

@@ -39,10 +39,10 @@ where(sorcery_config.remember_me_token_attribute_name => token).first end def find_by_username(username) query = sorcery_config.username_attribute_names.map {|name| {name => username}} - where(query).first + any_of(*query).first end def transaction(&blk) tap(&blk) end