diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-18 17:27:21 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-18 17:27:21 -0700 |
commit | 73efb68dc9cbecaad81598d6653cb3bb1927a40d (patch) | |
tree | b390cfb5098813eefb1fc6034ffca73c6aa42b44 /activerecord/lib | |
parent | aaff90ac7f4d7d796c0a420f660dc11fd4791f51 (diff) | |
parent | 0e1d617b8b869426960ec25b62620fe1599cb5e6 (diff) | |
download | rails-73efb68dc9cbecaad81598d6653cb3bb1927a40d.tar.gz rails-73efb68dc9cbecaad81598d6653cb3bb1927a40d.tar.bz2 rails-73efb68dc9cbecaad81598d6653cb3bb1927a40d.zip |
Merge pull request #2139 from mcmire/issue_2078_master
Fix for #2078 (against master)
Diffstat (limited to 'activerecord/lib')
-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 283115a448..220ead4edb 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 + orders = relation.order_values.map(&:presence).compact values = @klass.connection.distinct("#{@klass.connection.quote_table_name table_name}.#{primary_key}", orders) relation = relation.dup |