diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-28 16:43:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 16:43:28 -0400 |
commit | 8c65abe5f804522bcbf0d6f4327e7dfad0603941 (patch) | |
tree | d5ccbfd4eb67d82ff4ccd02c4d0b6f067d71fcd6 /activerecord/lib/active_record/relation/calculations.rb | |
parent | 97d276bf8a6b9d79dc50fcbc8a45f6071da0fcef (diff) | |
parent | 425f2cacafc522bb0aa426a0a4bc92c1237160aa (diff) | |
download | rails-8c65abe5f804522bcbf0d6f4327e7dfad0603941.tar.gz rails-8c65abe5f804522bcbf0d6f4327e7dfad0603941.tar.bz2 rails-8c65abe5f804522bcbf0d6f4327e7dfad0603941.zip |
Merge pull request #29405 from kamipo/locked_should_not_build_arel
`Relation#locked?` should not build arel
Diffstat (limited to 'activerecord/lib/active_record/relation/calculations.rb')
-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 c562f214c9..24b8be0242 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -311,7 +311,7 @@ module ActiveRecord relation.group_values = group_fields relation.select_values = select_values - calculated_data = @klass.connection.select_all(relation, nil, relation.bound_attributes) + calculated_data = @klass.connection.select_all(relation.arel, nil, relation.bound_attributes) if association key_ids = calculated_data.collect { |row| row[group_aliases.first] } |