aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/statement_cache.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-09-18 06:42:47 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-09-18 06:42:47 +0900
commit45588fef7eef095d33beaf192b0b6a8c9c8af348 (patch)
tree14d2736f022c2f4f86137f116b4bf0f4ed6fdd56 /activerecord/lib/active_record/statement_cache.rb
parent7f8f66e93136ef7ff602b6cdb1f6a7acfaafa486 (diff)
downloadrails-45588fef7eef095d33beaf192b0b6a8c9c8af348.tar.gz
rails-45588fef7eef095d33beaf192b0b6a8c9c8af348.tar.bz2
rails-45588fef7eef095d33beaf192b0b6a8c9c8af348.zip
Return `through_scope` only if the scope is not empty scope
Related 2b5f5cdd7c1d95716de6a206b6d09ccbb006dc17. If `through_scope` is empty scope, it is unnecessary to merge it. And also, comparing relations is a little expensive (will cause `build_arel`). It is enough to use `empty_scope?` to determine whether empty scope.
Diffstat (limited to 'activerecord/lib/active_record/statement_cache.rb')
0 files changed, 0 insertions, 0 deletions