From e79ebe8aeca9edb96c0cee850a6708f6bee2fe04 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 21 Feb 2013 14:38:47 -0300 Subject: [PATCH] Fix last mongoid tests since it does not have the order method --- test/rails_app/app/mongoid/shim.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/rails_app/app/mongoid/shim.rb b/test/rails_app/app/mongoid/shim.rb index 9b413522..602d059c 100644 --- a/test/rails_app/app/mongoid/shim.rb +++ b/test/rails_app/app/mongoid/shim.rb @@ -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)