diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2018-07-19 08:23:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-19 08:23:39 -0400 |
commit | 01429a665c1eadd20a64ca25d36190a9d9b555b1 (patch) | |
tree | eb66658e4443dbc76dbf1348badc39b7b1ff1ce5 /activerecord/test/models | |
parent | 04d5e08c13303b2ade8dba4097dffe31641ba6c9 (diff) | |
parent | 1173c7cad3684048c53f2ef9a5c936d9e58e75d0 (diff) | |
download | rails-01429a665c1eadd20a64ca25d36190a9d9b555b1.tar.gz rails-01429a665c1eadd20a64ca25d36190a9d9b555b1.tar.bz2 rails-01429a665c1eadd20a64ca25d36190a9d9b555b1.zip |
Merge pull request #33394 from kamipo/avoid_extra_scoping
Avoid extra scoping in delegating to klass methods in the `scope` block
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/post.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index 54eb5e6783..640cdb33b4 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -253,6 +253,7 @@ class SpecialPostWithDefaultScope < ActiveRecord::Base self.inheritance_column = :disabled self.table_name = "posts" default_scope { where(id: [1, 5, 6]) } + scope :unscoped_all, -> { unscoped { all } } end class PostThatLoadsCommentsInAnAfterSaveHook < ActiveRecord::Base |