diff options
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/method_scoping_test.rb | 12 |
2 files changed, 0 insertions, 16 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 18f75af11b..1b76f357e3 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1193,10 +1193,6 @@ module ActiveRecord #:nodoc: self.default_scoping << construct_finder_arel(options, default_scoping.pop) end - def clear_default_scope - self.default_scoping.clear - end - def scoped_methods #:nodoc: key = :"#{self}_scoped_methods" Thread.current[key] = Thread.current[key].presence || self.default_scoping.dup diff --git a/activerecord/test/cases/method_scoping_test.rb b/activerecord/test/cases/method_scoping_test.rb index 3a6354ec6d..cb599e363f 100644 --- a/activerecord/test/cases/method_scoping_test.rb +++ b/activerecord/test/cases/method_scoping_test.rb @@ -587,18 +587,6 @@ class HasAndBelongsToManyScopingTest< ActiveRecord::TestCase end end -class ClearDefaultScopeTest < ActiveRecord::TestCase - fixtures :developers - - def test_should_clear_default_scope - klass = Class.new(DeveloperCalledDavid) - klass.__send__ :clear_default_scope - expected = Developer.all.collect { |dev| dev.name } - actual = klass.all.collect { |dev| dev.name } - assert_equal expected, actual - end -end - class DefaultScopingTest < ActiveRecord::TestCase fixtures :developers, :posts |