Skip to content

Commit

Permalink
Add finder method for compatibility with #find(:first, …)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Sep 24, 2010
1 parent e14c091 commit fa2f203
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/devise/orm/mongo_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.