aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_scope.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2013-04-03 23:39:09 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2013-04-04 15:45:13 -0400
commit812469943cc6eddc132d137a0d5929b2c5d0346f (patch)
tree07e3cdbb65d8c2440a877d8e45c49e721607c66f /activerecord/lib/active_record/associations/association_scope.rb
parentdb113d90caabf7a5d16aef4b61d41155eb5b86c6 (diff)
downloadrails-812469943cc6eddc132d137a0d5929b2c5d0346f.tar.gz
rails-812469943cc6eddc132d137a0d5929b2c5d0346f.tar.bz2
rails-812469943cc6eddc132d137a0d5929b2c5d0346f.zip
has_many through obeys order on through association
fixes #10016
Diffstat (limited to 'activerecord/lib/active_record/associations/association_scope.rb')
-rw-r--r--activerecord/lib/active_record/associations/association_scope.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb
index a9525436fb..b62a16ea3f 100644
--- a/activerecord/lib/active_record/associations/association_scope.rb
+++ b/activerecord/lib/active_record/associations/association_scope.rb
@@ -101,6 +101,7 @@ module ActiveRecord
scope.includes! item.includes_values
scope.where_values += item.where_values
+ scope.order_values += (item.order_values - scope.order_values)
end
end