aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/scoping/named.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-04-06 11:37:34 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-04-06 11:37:34 +0900
commit56b4fdb52bd327d42aec9ee3dcea01298aafe945 (patch)
treec2dc09e95f247dc9180a5d371bd7b5c97918a541 /activerecord/lib/active_record/scoping/named.rb
parente9d1d7668604c176dc795e4f8759a2addfd9669c (diff)
downloadrails-56b4fdb52bd327d42aec9ee3dcea01298aafe945.tar.gz
rails-56b4fdb52bd327d42aec9ee3dcea01298aafe945.tar.bz2
rails-56b4fdb52bd327d42aec9ee3dcea01298aafe945.zip
Association loading isn't to be affected by null relation scoping
Follow up of #35868. Closes #19349.
Diffstat (limited to 'activerecord/lib/active_record/scoping/named.rb')
-rw-r--r--activerecord/lib/active_record/scoping/named.rb2
1 files changed, 1 insertions, 1 deletions
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
[]