aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-06-29 08:24:58 -0400
committerGitHub <noreply@github.com>2017-06-29 08:24:58 -0400
commitae751b8f6cfe0fa1846a05eab5f472b852d66d5a (patch)
tree3962564117aef2438a88ca9dc5bd7a11c11c32e7 /activerecord/lib/active_record/relation.rb
parent1e798ccb8ff83cc5a014d333e7a1e92e5d146c23 (diff)
parent99912ed92635600eb6b03959c33638cb62f1bdca (diff)
downloadrails-ae751b8f6cfe0fa1846a05eab5f472b852d66d5a.tar.gz
rails-ae751b8f6cfe0fa1846a05eab5f472b852d66d5a.tar.bz2
rails-ae751b8f6cfe0fa1846a05eab5f472b852d66d5a.zip
Merge pull request #29569 from kamipo/fix_to_scoping_is_correctly_restored
Fix to scoping is correctly restored
Diffstat (limited to 'activerecord/lib/active_record/relation.rb')
-rw-r--r--activerecord/lib/active_record/relation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index 133c1a6318..52f5d5f3e3 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -333,7 +333,7 @@ module ActiveRecord
# Please check unscoped if you want to remove all previous scopes (including
# the default_scope) during the execution of a block.
def scoping
- previous, klass.current_scope = klass.current_scope, self
+ previous, klass.current_scope = klass.current_scope(true), self
yield
ensure
klass.current_scope = previous