Permalink
Browse files

Do not remove options from MongoMapper and DataMapper in find.

  • Loading branch information...
josevalim committed Feb 23, 2010
1 parent 33cf55a commit e6f3034b11331618f3b6153bee8bbfc6209924de
Showing with 16 additions and 14 deletions.
  1. +7 −0 CHANGELOG.rdoc
  2. +4 −7 lib/devise/orm/data_mapper.rb
  3. +5 −7 lib/devise/orm/mongo_mapper.rb
View
@@ -7,13 +7,20 @@
* 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.
* Scoped views are no longer "sessions/users/new". Now use "users/sessions/new".
* 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 @@ def #{callback}
# 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 Compatibility
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

0 comments on commit e6f3034

Please sign in to comment.