Do not remove options from MongoMapper and DataMapper in find.
This commit is contained in:
parent
33cf55aa13
commit
e6f3034b11
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue