diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-10 10:22:22 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-10 10:22:22 -0700 |
commit | a8b4bdb3d6efefe658a0ac4cfb28b69fba494704 (patch) | |
tree | c6cd510dd1951d819465bfc2a8e700a0ffc931b6 /activerecord/lib/active_record | |
parent | a513f8f8bb3c4fff88ab27a8f2c591d9d7c27cf9 (diff) | |
download | rails-a8b4bdb3d6efefe658a0ac4cfb28b69fba494704.tar.gz rails-a8b4bdb3d6efefe658a0ac4cfb28b69fba494704.tar.bz2 rails-a8b4bdb3d6efefe658a0ac4cfb28b69fba494704.zip |
avoid method_missing and reduce method calls
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/batches.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ module ActiveRecord 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 |