diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-10 14:44:42 -0800 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2010-12-16 01:49:27 +0530 |
commit | 0042054ea873a8d25d9bbdc4c7fe0febe1b76042 (patch) | |
tree | 6c11b137813a09f10f1964138d9342e0e94ef88d /activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb | |
parent | cea73f82ad65bf8bca707f6f8f3afd86f3e82bdb (diff) | |
download | rails-0042054ea873a8d25d9bbdc4c7fe0febe1b76042.tar.gz rails-0042054ea873a8d25d9bbdc4c7fe0febe1b76042.tar.bz2 rails-0042054ea873a8d25d9bbdc4c7fe0febe1b76042.zip |
remove lasgn since AST is mutated
Diffstat (limited to 'activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb index 98536d23bc..4839068f6d 100644 --- a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb +++ b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb @@ -135,9 +135,15 @@ module ActiveRecord conditions << process_conditions(options[:conditions], aliased_table_name) end - join = relation.join(target_table, join_type) + ands = relation.create_and(conditions) - join.on(*conditions) + join = relation.create_join( + relation.froms.first, + target_table, + relation.create_on(ands), + join_type) + + relation.from join end def join_has_and_belongs_to_many_to(relation) |