From 56b4fdb52bd327d42aec9ee3dcea01298aafe945 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 6 Apr 2019 11:37:34 +0900 Subject: Association loading isn't to be affected by null relation scoping Follow up of #35868. Closes #19349. --- activerecord/lib/active_record/scoping/named.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/scoping/named.rb') diff --git a/activerecord/lib/active_record/scoping/named.rb b/activerecord/lib/active_record/scoping/named.rb index 681a5c6250..cd9801b7a0 100644 --- a/activerecord/lib/active_record/scoping/named.rb +++ b/activerecord/lib/active_record/scoping/named.rb @@ -58,7 +58,7 @@ module ActiveRecord end def default_extensions # :nodoc: - if scope = current_scope || build_default_scope + if scope = scope_for_association || build_default_scope scope.extensions else [] -- cgit v1.2.3