Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit fa2f20310e0988295adc192255d3b1cedee1b412 1 parent e14c091
@bkeepers bkeepers authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/devise/orm/mongo_mapper.rb
View
9 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
Please sign in to comment.
Something went wrong with that request. Please try again.