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.
|
* Devise.orm is deprecated. This reduces the required API to hook your ORM with devise.
|
||||||
* Use metal for failure app.
|
* Use metal for failure app.
|
||||||
* HTML e-mails now have proper formatting.
|
* HTML e-mails now have proper formatting.
|
||||||
|
* Do not remove options from Datamapper and MongoMapper in find
|
||||||
|
|
||||||
* deprecations
|
* deprecations
|
||||||
* Rails 3 compatible only.
|
* Rails 3 compatible only.
|
||||||
|
@ -14,6 +15,12 @@
|
||||||
* Devise.orm is deprecated, just require "devise/orm/YOUR_ORM" instead.
|
* Devise.orm is deprecated, just require "devise/orm/YOUR_ORM" instead.
|
||||||
* Devise.default_url_options is deprecated, just modify ApplicationController.default_url_options.
|
* 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
|
== 1.0.2
|
||||||
|
|
||||||
* enhancements
|
* enhancements
|
|
@ -59,14 +59,11 @@ module Devise
|
||||||
|
|
||||||
# Add ActiveRecord like finder
|
# Add ActiveRecord like finder
|
||||||
def find(*args)
|
def find(*args)
|
||||||
options = args.extract_options!
|
|
||||||
case args.first
|
case args.first
|
||||||
when :first
|
when :first, :all
|
||||||
first(options)
|
send(args.shift, *args)
|
||||||
when :all
|
else
|
||||||
all(options)
|
get(*args)
|
||||||
else
|
|
||||||
get(*args)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -27,18 +27,16 @@ module Devise
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
def find(*args)
|
def find(*args)
|
||||||
options = args.extract_options!
|
|
||||||
case args.first
|
case args.first
|
||||||
when :first
|
when :first, :all
|
||||||
first(options)
|
send(args.shift, *args)
|
||||||
when :all
|
else
|
||||||
all(options)
|
super
|
||||||
else
|
|
||||||
super
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue