diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-19 17:46:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-19 17:46:54 -0700 |
commit | dc16163d068479993002f5540368b8dbcc3724d1 (patch) | |
tree | 6b483d3f466509739f8178f671198d9a8702ca9d | |
parent | c56fea2be49cc4a61d385835a097772f4d27a5dd (diff) | |
download | rails-dc16163d068479993002f5540368b8dbcc3724d1.tar.gz rails-dc16163d068479993002f5540368b8dbcc3724d1.tar.bz2 rails-dc16163d068479993002f5540368b8dbcc3724d1.zip |
use array math rather than looping through the array
-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 dcddc3dac4..c2af4b1571 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -38,7 +38,7 @@ module ActiveRecord merged_relation.where_values = merged_wheres - Relation::SINGLE_VALUE_METHODS.reject {|m| m == :lock}.each do |method| + (Relation::SINGLE_VALUE_METHODS - [:lock]).each do |method| value = r.send(:"#{method}_value") merged_relation.send(:"#{method}_value=", value) unless value.nil? end |