aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-05-25 09:54:06 +0930
committerGitHub <noreply@github.com>2017-05-25 09:54:06 +0930
commit6db27ce0946a8c4072b49c4b203811e5751ad406 (patch)
tree33288b9d87b7e3236b79ee79000598ca8819e252 /activerecord/lib/active_record
parentc7dd4a7a9f20216091399a30a9750a8cf598798e (diff)
parentf3f652827f1db772741d56664cd3fb583873d0cd (diff)
downloadrails-6db27ce0946a8c4072b49c4b203811e5751ad406.tar.gz
rails-6db27ce0946a8c4072b49c4b203811e5751ad406.tar.bz2
rails-6db27ce0946a8c4072b49c4b203811e5751ad406.zip
Merge pull request #29181 from kamipo/fix_circular_left_joins_with_scoping
Fix crashing on circular left join references with scoping
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/reflection.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 1a9e0a4a40..65fdbc2fe4 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -199,7 +199,7 @@ module ActiveRecord
def klass_join_scope(table, predicate_builder) # :nodoc:
if klass.current_scope
klass.current_scope.clone.tap { |scope|
- scope.joins_values = []
+ scope.joins_values = scope.left_outer_joins_values = [].freeze
}
else
relation = ActiveRecord::Relation.create(