From 54a043895f904e0237a590738d494554ec555265 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sun, 17 Jan 2010 14:16:50 +0530 Subject: Make merging of order values consistent --- activerecord/lib/active_record/relation/spawn_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index f4abaae43e..953ea5ea1c 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -33,7 +33,7 @@ module ActiveRecord from(r.from_value). having(r.having_values) - merged_relation.order_values = Array.wrap(order_values) + Array.wrap(r.order_values) + merged_relation.order_values = r.order_values if r.order_values.present? merged_relation.create_with_value = @create_with_value -- cgit v1.2.3