aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-17 14:16:50 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-17 14:19:41 +0530
commit54a043895f904e0237a590738d494554ec555265 (patch)
tree560a6a5cec771af1d934609e785d6f4cb411dccc /activerecord/lib/active_record/relation
parentf9a4300415a320e1cb01fb3806fbd3637df38183 (diff)
downloadrails-54a043895f904e0237a590738d494554ec555265.tar.gz
rails-54a043895f904e0237a590738d494554ec555265.tar.bz2
rails-54a043895f904e0237a590738d494554ec555265.zip
Make merging of order values consistent
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/spawn_methods.rb2
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 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