1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Honor the order in the new finder

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-04-15 08:32:56 +00:00
parent 624d5bb176
commit 9dd8d3d3e4

View file

@ -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