Skip to content

Commit

Permalink
current_scope{,=} are public methods
Browse files Browse the repository at this point in the history
`send` is not necessary.
  • Loading branch information
kamipo committed Jan 27, 2020
1 parent 1d3bf3a commit dc06d4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion activerecord/test/cases/base_test.rb
Expand Up @@ -1170,7 +1170,7 @@ def test_clear_cache!

def test_current_scope_is_reset
Object.const_set :UnloadablePost, Class.new(ActiveRecord::Base)
UnloadablePost.send(:current_scope=, UnloadablePost.all)
UnloadablePost.current_scope = UnloadablePost.all

UnloadablePost.unloadable
klass = UnloadablePost
Expand Down
4 changes: 2 additions & 2 deletions activerecord/test/cases/scoping/relation_scoping_test.rb
Expand Up @@ -274,8 +274,8 @@ def test_scoping_is_correctly_restored
SpecialComment.unscoped.created
end

assert_nil Comment.send(:current_scope)
assert_nil SpecialComment.send(:current_scope)
assert_nil Comment.current_scope
assert_nil SpecialComment.current_scope
end

def test_scoping_respects_current_class
Expand Down

0 comments on commit dc06d4b

Please sign in to comment.