From e94e53f9cd70bee69759661e9771da3fe0ee9554 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Mon, 9 Jun 2008 11:30:48 -0400 Subject: fix eager loading with dynamic finders --- activerecord/lib/active_record/associations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations.rb') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index a3d1bbbada..f32b217326 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1506,7 +1506,7 @@ module ActiveRecord end def order_tables(options) - order = options[:order] + order = [options[:order], scope(:find, :order) ].join(", ") return [] unless order && order.is_a?(String) order.scan(/([\.\w]+).?\./).flatten end -- cgit v1.2.3