aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-04-06 12:00:17 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-04-06 12:00:17 +0900
commit0856f7c744e631b6efafbb14d01e60bbfaa593f5 (patch)
treef360e33010b419387e15722854467167b8ab7fe3 /activerecord/lib
parent56b4fdb52bd327d42aec9ee3dcea01298aafe945 (diff)
downloadrails-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.rb2
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: