aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/lib/active_record/migration/join_table.rb
blob: 45169617c1868a92e9db58125fddcc1a3c45ff2a (plain) (tree)
1
2
3
4
5
6
7
8
9

                             



                             


                                                                          
 


                                                                     


       
# frozen_string_literal: true

module ActiveRecord
  class Migration
    module JoinTable #:nodoc:
      private
        def find_join_table_name(table_1, table_2, options = {})
          options.delete(:table_name) || join_table_name(table_1, table_2)
        end

        def join_table_name(table_1, table_2)
          ModelSchema.derive_join_table_name(table_1, table_2).to_sym
        end
    end
  end
end