diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-18 06:42:47 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-18 06:42:47 +0900 |
commit | 45588fef7eef095d33beaf192b0b6a8c9c8af348 (patch) | |
tree | 14d2736f022c2f4f86137f116b4bf0f4ed6fdd56 /activerecord/test/support/schema_dumping_helper.rb | |
parent | 7f8f66e93136ef7ff602b6cdb1f6a7acfaafa486 (diff) | |
download | rails-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/test/support/schema_dumping_helper.rb')
0 files changed, 0 insertions, 0 deletions