aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-12-27 17:16:20 +0530
committerPratik Naik <pratiknaik@gmail.com>2009-12-27 17:16:20 +0530
commit6f5e3a04d655e09c0a9a32fc94c752f84c7011f6 (patch)
tree2101b0f335884ba117643b9c0e8fb66545f7a962 /activerecord/lib/active_record/relation.rb
parent7b5d0e8b784a60927e923f2c21ab6a7c4f35f5c3 (diff)
downloadrails-6f5e3a04d655e09c0a9a32fc94c752f84c7011f6.tar.gz
rails-6f5e3a04d655e09c0a9a32fc94c752f84c7011f6.tar.bz2
rails-6f5e3a04d655e09c0a9a32fc94c752f84c7011f6.zip
Relation should supply :from to find_with_associations
Diffstat (limited to 'activerecord/lib/active_record/relation.rb')
-rw-r--r--activerecord/lib/active_record/relation.rb3
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