diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-15 11:34:54 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-15 17:40:15 +0900 |
commit | 4c6171d6056a346a953792a954853d14c000dc90 (patch) | |
tree | 6828ab3c21482a8a81bc0c9229e2028e9e26bdc0 /activerecord/lib/active_record/relation | |
parent | cdb8697b4a654aad2e65590d58c5f581a53d6b33 (diff) | |
download | rails-4c6171d6056a346a953792a954853d14c000dc90.tar.gz rails-4c6171d6056a346a953792a954853d14c000dc90.tar.bz2 rails-4c6171d6056a346a953792a954853d14c000dc90.zip |
Deprecate using class level querying methods if the receiver scope regarded as leaked
This deprecates using class level querying methods if the receiver scope
regarded as leaked, since #32380 and #35186 may cause that silently
leaking information when people upgrade the app.
We need deprecation first before making those.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/spawn_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index 7874c4c35a..efc4b447aa 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -8,7 +8,7 @@ module ActiveRecord module SpawnMethods # This is overridden by Associations::CollectionProxy def spawn #:nodoc: - @delegate_to_klass ? klass.all : clone + already_in_scope? ? klass.all : clone end # Merges in the conditions from <tt>other</tt>, if <tt>other</tt> is an ActiveRecord::Relation. |