diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-28 21:35:20 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-28 21:35:20 -0300 |
commit | 68a949bae7408dafdfdd28b6c1de25d5348e64c7 (patch) | |
tree | f7807c5dc44fd56d11d3487337df287bc1e10dc6 /activerecord | |
parent | 0d0c46abd12bfbe8f42a78fc6f9fee7d96438194 (diff) | |
download | rails-68a949bae7408dafdfdd28b6c1de25d5348e64c7.tar.gz rails-68a949bae7408dafdfdd28b6c1de25d5348e64c7.tar.bz2 rails-68a949bae7408dafdfdd28b6c1de25d5348e64c7.zip |
PERF: Avoid two method calls
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/spawn_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index 05b26cd0c4..e7e5f26ce0 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -8,7 +8,7 @@ module ActiveRecord ((Relation::ASSOCIATION_METHODS + Relation::MULTI_VALUE_METHODS) - [:joins, :where]).each do |method| value = r.send(:"#{method}_values") - if value.present? + unless value.empty? if method == :includes merged_relation = merged_relation.includes(value) else |