diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2015-03-17 02:31:02 -0700 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2015-03-17 04:59:50 -0700 |
commit | 38ccfe689d65ece84c07f2d90fc7aa570c2f27cc (patch) | |
tree | 798a82a04126c3b90a8336222e59f7fc97bb4370 /activerecord/lib | |
parent | f244a12cc66d4e98b640e46f57f535d02a1453f5 (diff) | |
download | rails-38ccfe689d65ece84c07f2d90fc7aa570c2f27cc.tar.gz rails-38ccfe689d65ece84c07f2d90fc7aa570c2f27cc.tar.bz2 rails-38ccfe689d65ece84c07f2d90fc7aa570c2f27cc.zip |
Drop `references_eager_loaded_tables?` test from `has_include?`
It is redundant with tests in `eager_loading?`, but for the difference
between `includes_values.present?` and `includes_values.any?`, which
is a difference without a distinction because `false` has no meaning
for `includes`.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index 7f27e7b463..8f16de3519 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -182,7 +182,7 @@ module ActiveRecord private def has_include?(column_name) - eager_loading? || (includes_values.present? && ((column_name && column_name != :all) || references_eager_loaded_tables?)) + eager_loading? || (includes_values.present? && column_name && column_name != :all) end def perform_calculation(operation, column_name) |