From 7d459203eedc32f1a88e98acc4b2a4f32a7683f4 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Wed, 21 Nov 2007 01:51:57 +0000 Subject: Make Dynamic Finders on Association Collections Respect Association :order [patrick.t.joyce, technoweenie]. Closes #10211 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/associations/has_many_through_association.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb') diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 8bff88e839..a9cacb09c8 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -235,7 +235,8 @@ module ActiveRecord :find => { :from => construct_from, :conditions => construct_conditions, :joins => construct_joins, - :select => construct_select } } + :select => construct_select, + :order => @reflection.options[:order] } } end def construct_sql -- cgit v1.2.3