diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb index 6ca287a4e330d4042fb968cedb397fbf31f03dc9..3329a4af8eb2460f2901a1d19d34c2ca60911537 100644 --- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +++ b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb @@ -5,8 +5,7 @@ class HasAndBelongsToManyAssociation < AssociationCollection #:nodoc: attr_reader :join_table def initialize(owner, reflection) - @join_table_name = reflection.options[:join_table] - @join_table = Arel::Table.new(@join_table_name) + @join_table = Arel::Table.new(reflection.options[:join_table]) super end