aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/spawn_methods.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-10-10 21:32:01 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-10-11 11:54:46 -0200
commite0b76d6151821527f16b3f163abde3ebea1b2a50 (patch)
treec303ea44988442d7dfbe021586978bba2d2de22a /activerecord/lib/active_record/relation/spawn_methods.rb
parent21a92b8d01eed34a6b26adb51139f1c40467409e (diff)
downloadrails-e0b76d6151821527f16b3f163abde3ebea1b2a50.tar.gz
rails-e0b76d6151821527f16b3f163abde3ebea1b2a50.tar.bz2
rails-e0b76d6151821527f16b3f163abde3ebea1b2a50.zip
reorder removed in favor of except(:order).order
Diffstat (limited to 'activerecord/lib/active_record/relation/spawn_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/spawn_methods.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb
index 9ecdb99bee..dcddc3dac4 100644
--- a/activerecord/lib/active_record/relation/spawn_methods.rb
+++ b/activerecord/lib/active_record/relation/spawn_methods.rb
@@ -19,20 +19,11 @@ module ActiveRecord
end
end
- (Relation::MULTI_VALUE_METHODS - [:joins, :where, :order]).each do |method|
+ (Relation::MULTI_VALUE_METHODS - [:joins, :where]).each do |method|
value = r.send(:"#{method}_values")
merged_relation.send(:"#{method}_values=", merged_relation.send(:"#{method}_values") + value) if value.present?
end
- order_value = r.order_values
- if order_value.present?
- if r.reorder_flag
- merged_relation.order_values = order_value
- else
- merged_relation.order_values = merged_relation.order_values + order_value
- end
- end
-
merged_relation = merged_relation.joins(r.joins_values)
merged_wheres = @where_values