deprecate find(:first) and find(:all) in MongoMapper

This commit is contained in:
Matt Powell
2010-02-03 13:00:03 +08:00
committed by José Valim
parent a9e2337aeb
commit 02a99b9766

View File

@@ -20,7 +20,19 @@ module Devise
klass.send(mod) if klass.respond_to?(mod)
end
end
def find(*args)
options = args.extract_options!
case args.first
when :first
first(options)
when :all
all(options)
else
super
end
end
include Devise::Schema
# Tell how to apply schema methods. This automatically converts DateTime