Do not remove options from MongoMapper and DataMapper in find.

This commit is contained in:
José Valim 2010-02-23 15:51:29 +01:00
parent 33cf55aa13
commit e6f3034b11
3 changed files with 16 additions and 14 deletions

View File

@ -7,6 +7,7 @@
* Devise.orm is deprecated. This reduces the required API to hook your ORM with devise.
* Use metal for failure app.
* HTML e-mails now have proper formatting.
* Do not remove options from Datamapper and MongoMapper in find
* deprecations
* Rails 3 compatible only.
@ -14,6 +15,12 @@
* Devise.orm is deprecated, just require "devise/orm/YOUR_ORM" instead.
* Devise.default_url_options is deprecated, just modify ApplicationController.default_url_options.
== 1.0.3
* enhancements
* HTML e-mails now have proper formatting
* Do not remove MongoMapper options in find
== 1.0.2
* enhancements

View File

@ -59,14 +59,11 @@ module Devise
# Add ActiveRecord like finder
def find(*args)
options = args.extract_options!
case args.first
when :first
first(options)
when :all
all(options)
else
get(*args)
when :first, :all
send(args.shift, *args)
else
get(*args)
end
end
end

View File

@ -27,18 +27,16 @@ module Devise
module ClassMethods
def find(*args)
options = args.extract_options!
case args.first
when :first
first(options)
when :all
all(options)
else
super
when :first, :all
send(args.shift, *args)
else
super
end
end
end
end
end
end
end