Permalink
Browse files

Add finder method for compatibility with #find(:first, …)

  • Loading branch information...
1 parent e14c091 commit fa2f20310e0988295adc192255d3b1cedee1b412 @bkeepers bkeepers committed Sep 24, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/devise/orm/mongo_mapper.rb
@@ -28,6 +28,15 @@ module Devise
module ClassMethods
include ::Devise::Models
include ::Devise::Orm::MongoMapper::Hook
+
+ def find(*args)
+ if args.first == :first
+ args.shift
+ first(*args)
+ else
+ super
+ end
+ end
end
end
end

0 comments on commit fa2f203

Please sign in to comment.