aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-07-19 12:18:46 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-07-19 12:18:46 -0700
commitee6be604c68dd2e4dc6daa7beac525e5d6ac7d61 (patch)
treed9fc03524462588e1a20456fe0acc91640783fce
parent30289c76830430d361a8c2045d54103c435376c2 (diff)
parent02cbaf059330729a1bf9528c24b7dbbfbf6bdc88 (diff)
downloadrails-ee6be604c68dd2e4dc6daa7beac525e5d6ac7d61.tar.gz
rails-ee6be604c68dd2e4dc6daa7beac525e5d6ac7d61.tar.bz2
rails-ee6be604c68dd2e4dc6daa7beac525e5d6ac7d61.zip
Merge pull request #2154 from vijaydev/better_map
Avoid Symbol#to_proc
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 220ead4edb..8cef4e5554 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -243,7 +243,7 @@ module ActiveRecord
end
def construct_limited_ids_condition(relation)
- orders = relation.order_values.map(&:presence).compact
+ orders = relation.order_values.map { |val| val.presence }.compact
values = @klass.connection.distinct("#{@klass.connection.quote_table_name table_name}.#{primary_key}", orders)
relation = relation.dup