aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-05-23 00:11:52 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-05-24 21:56:20 +0900
commitf3f652827f1db772741d56664cd3fb583873d0cd (patch)
treeffe5d777a881f89968337f9f32e9f508f15f5794 /activerecord/lib/active_record
parent3a628b9338c436001c00a9865b22036abd44a2bd (diff)
downloadrails-f3f652827f1db772741d56664cd3fb583873d0cd.tar.gz
rails-f3f652827f1db772741d56664cd3fb583873d0cd.tar.bz2
rails-f3f652827f1db772741d56664cd3fb583873d0cd.zip
Fix crashing on circular left join references with scoping
Follow up of #25702.
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(