Fix last mongoid tests since it does not have the order method

This commit is contained in:
Carlos Antonio da Silva
2013-02-21 14:38:47 -03:00
parent 10f93129c3
commit e79ebe8aec

View File

@@ -8,9 +8,8 @@ module Shim
end
module ClassMethods
def last(options = {})
options.delete(:order) if options[:order] == "id"
where(options).last
def order(attribute)
asc(attribute)
end
def find_by_email(email)