diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-10 13:26:58 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-10 13:26:58 -0800 |
commit | f528389a5580227f4d173bf4915a98b71befb32e (patch) | |
tree | 50ced783058be70d13ce932503d928d90868a8c5 /activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb | |
parent | 73d4d6704ec2a5b11e32d7f421f4614ac83d8384 (diff) | |
download | rails-f528389a5580227f4d173bf4915a98b71befb32e.tar.gz rails-f528389a5580227f4d173bf4915a98b71befb32e.tar.bz2 rails-f528389a5580227f4d173bf4915a98b71befb32e.zip |
use alias nodes to represent table aliases
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 | 5 |
1 files changed, 2 insertions, 3 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 5c062e874e..ff6a9993b0 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 @@ -142,9 +142,8 @@ module ActiveRecord def join_has_and_belongs_to_many_to(relation) join_table = Arel::Table.new( - options[:join_table], :engine => arel_engine, - :as => @aliased_join_table_name - ) + options[:join_table] + ).alias(@aliased_join_table_name) fk = options[:foreign_key] || reflection.active_record.to_s.foreign_key klass_fk = options[:association_foreign_key] || reflection.klass.to_s.foreign_key |