diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-15 08:32:56 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-15 08:32:56 +0000 |
commit | 9dd8d3d3e4dc1b91cf8489ea9f3fee9bb0c27c65 (patch) | |
tree | 5619907777e82676f64ac32ee28707d7b53a9a37 /activerecord | |
parent | 624d5bb176de5212bea43a1c57a95f48676c6e9f (diff) | |
download | rails-9dd8d3d3e4dc1b91cf8489ea9f3fee9bb0c27c65.tar.gz rails-9dd8d3d3e4dc1b91cf8489ea9f3fee9bb0c27c65.tar.bz2 rails-9dd8d3d3e4dc1b91cf8489ea9f3fee9bb0c27c65.zip |
Honor the order in the new finder
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_association.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index 4a9d773ac7..6ed2782b0b 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -66,6 +66,7 @@ module ActiveRecord end else options[:conditions] = @finder_sql + (options[:conditions] ? " AND #{options[:conditions]}" : "") + options[:order] = options[:order] ? "#{options[:order]}, #{@options[:order]}" : @options[:order] @association_class.find(args.size == 1 ? args.first : args, options) end end |