aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/spawn_methods.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/relation/spawn_methods.rb')
-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