diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-07 16:48:59 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-07 16:48:59 -0800 |
commit | 2d9d6cd4c263f639adf8e26c7d95e7772e0c4eb7 (patch) | |
tree | 77f3d650bc01bbd0983a1bf7b0231ad70dd629ee /activerecord/lib/active_record/relation | |
parent | d6133209ce54bac430e63ec512251eae182b79e1 (diff) | |
download | rails-2d9d6cd4c263f639adf8e26c7d95e7772e0c4eb7.tar.gz rails-2d9d6cd4c263f639adf8e26c7d95e7772e0c4eb7.tar.bz2 rails-2d9d6cd4c263f639adf8e26c7d95e7772e0c4eb7.zip |
passing the ast to JoinDependency
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 51ba17c9be..906ad7699c 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -196,7 +196,7 @@ module ActiveRecord def construct_relation_for_association_calculations including = (@eager_load_values + @includes_values).uniq - join_dependency = ActiveRecord::Associations::ClassMethods::JoinDependency.new(@klass, including, arel.join_sql) + join_dependency = ActiveRecord::Associations::ClassMethods::JoinDependency.new(@klass, including, arel.froms.first) relation = except(:includes, :eager_load, :preload) apply_join_dependency(relation, join_dependency) end |