diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-18 10:22:05 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-19 00:50:40 +0900 |
commit | d13f54d50a166d49c683f79d49341185788faed8 (patch) | |
tree | 14468a7ece9ce1bfcc4aa06c027a50f722146170 /activerecord/test/models | |
parent | 58c567adaeba1208522640e7890db9e07cbb768a (diff) | |
download | rails-d13f54d50a166d49c683f79d49341185788faed8.tar.gz rails-d13f54d50a166d49c683f79d49341185788faed8.tar.bz2 rails-d13f54d50a166d49c683f79d49341185788faed8.zip |
Fix unscoping `default_scope` in STI associations
Since 5c71000, it has lost to be able to unscope `default_scope` in STI
associations. This change will use `.empty_scope?` instead of
`.values.empty?` to regard as an empty scope if only have
`type_condition`.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/comment.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb index eecf923046..dc2d421cd7 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -54,6 +54,7 @@ class Comment < ActiveRecord::Base end class SpecialComment < Comment + default_scope { where(deleted_at: nil) } end class SubSpecialComment < SpecialComment |