diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-27 17:16:20 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-27 17:16:20 +0530 |
commit | 6f5e3a04d655e09c0a9a32fc94c752f84c7011f6 (patch) | |
tree | 2101b0f335884ba117643b9c0e8fb66545f7a962 /activerecord | |
parent | 7b5d0e8b784a60927e923f2c21ab6a7c4f35f5c3 (diff) | |
download | rails-6f5e3a04d655e09c0a9a32fc94c752f84c7011f6.tar.gz rails-6f5e3a04d655e09c0a9a32fc94c752f84c7011f6.tar.bz2 rails-6f5e3a04d655e09c0a9a32fc94c752f84c7011f6.zip |
Relation should supply :from to find_with_associations
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index c927270eee..f1d1fa0790 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -93,7 +93,8 @@ module ActiveRecord :order => @relation.send(:order_clauses).join(', '), :conditions => where_clause, :limit => @relation.taken, - :offset => @relation.skipped + :offset => @relation.skipped, + :from => @relation.send(:table_sql, Arel::Sql::TableReference.new(@relation)) }, ActiveRecord::Associations::ClassMethods::JoinDependency.new(@klass, @eager_load_associations, nil)) end |