From a8b4bdb3d6efefe658a0ac4cfb28b69fba494704 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 10 Sep 2010 10:22:22 -0700 Subject: [PATCH] avoid method_missing and reduce method calls --- activerecord/lib/active_record/relation/batches.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/relation/batches.rb b/activerecord/lib/active_record/relation/batches.rb index d7494ebb5a..5584397439 100644 --- a/activerecord/lib/active_record/relation/batches.rb +++ b/activerecord/lib/active_record/relation/batches.rb @@ -50,7 +50,7 @@ def find_each(options = {}) def find_in_batches(options = {}) relation = self - if orders.present? || taken.present? + unless arel.orders.blank? && arel.taken.blank? ActiveRecord::Base.logger.warn("Scoped order and limit are ignored, it's forced to be batch order and batch size") end -- GitLab