diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-19 12:18:46 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-19 12:18:46 -0700 |
commit | ee6be604c68dd2e4dc6daa7beac525e5d6ac7d61 (patch) | |
tree | d9fc03524462588e1a20456fe0acc91640783fce | |
parent | 30289c76830430d361a8c2045d54103c435376c2 (diff) | |
parent | 02cbaf059330729a1bf9528c24b7dbbfbf6bdc88 (diff) | |
download | rails-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.rb | 2 |
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 |