diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-06 12:00:17 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-06 12:00:17 +0900 |
commit | 0856f7c744e631b6efafbb14d01e60bbfaa593f5 (patch) | |
tree | f360e33010b419387e15722854467167b8ab7fe3 /activerecord/lib | |
parent | 56b4fdb52bd327d42aec9ee3dcea01298aafe945 (diff) | |
download | rails-0856f7c744e631b6efafbb14d01e60bbfaa593f5.tar.gz rails-0856f7c744e631b6efafbb14d01e60bbfaa593f5.tar.bz2 rails-0856f7c744e631b6efafbb14d01e60bbfaa593f5.zip |
There is no need to check `null_relation?` in `empty_scope?`
`values[:extending]` includes `NullRelation` if `null_relation?`.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index c1cdad9c87..cd62b0b881 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -689,7 +689,7 @@ module ActiveRecord end def empty_scope? # :nodoc: - !null_relation? && @values == klass.unscoped.values + @values == klass.unscoped.values end def has_limit_or_offset? # :nodoc: |