diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-06 04:57:28 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-06 04:57:28 +0900 |
commit | e9d1d7668604c176dc795e4f8759a2addfd9669c (patch) | |
tree | 9b0f8c8b59b58a4178fce3502f4ac1f1c00d4ce3 /activerecord/lib/active_record | |
parent | 808c589fd883d87da720e3ffc103437bdf7e457e (diff) | |
parent | 17f2f3054c218485fff598966c39cd3d8a6f6056 (diff) | |
download | rails-e9d1d7668604c176dc795e4f8759a2addfd9669c.tar.gz rails-e9d1d7668604c176dc795e4f8759a2addfd9669c.tar.bz2 rails-e9d1d7668604c176dc795e4f8759a2addfd9669c.zip |
Merge pull request #35868 from kamipo/association_isnt_to_be_affected_by_scoping_consistently
Association loading isn't to be affected by scoping consistently
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index 0bb63b97ae..cf22b850b9 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -225,7 +225,7 @@ module ActiveRecord # Can be overridden (i.e. in ThroughAssociation) to merge in other scopes (i.e. the # through association's scope) def target_scope - AssociationRelation.create(klass, self).merge!(klass.all) + AssociationRelation.create(klass, self).merge!(klass.scope_for_association) end def scope_for_create |