Sha256: 3769d38d00e5004633804261f913bebe5efad061ff2a89409faa30d0b144e54d

Contents?: true

Size: 361 Bytes

Versions: 73

Compression:

Stored size: 361 Bytes

Contents

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)
        [table_1.to_s, table_2.to_s].sort.join("_").to_sym
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 3 rubygems

Version Path
activerecord-4.1.16 lib/active_record/migration/join_table.rb
activerecord-4.1.16.rc1 lib/active_record/migration/join_table.rb
activerecord-4.1.15 lib/active_record/migration/join_table.rb
activerecord-4.1.15.rc1 lib/active_record/migration/join_table.rb
activerecord-4.1.14.2 lib/active_record/migration/join_table.rb
activerecord-4.1.14.1 lib/active_record/migration/join_table.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activerecord-4.1.13/lib/active_record/migration/join_table.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activerecord-4.1.13/lib/active_record/migration/join_table.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activerecord-4.1.13/lib/active_record/migration/join_table.rb
activerecord-4.1.14 lib/active_record/migration/join_table.rb
activerecord-4.1.14.rc2 lib/active_record/migration/join_table.rb
activerecord-4.1.14.rc1 lib/active_record/migration/join_table.rb
activerecord-4.1.13 lib/active_record/migration/join_table.rb
activerecord-4.1.13.rc1 lib/active_record/migration/join_table.rb
activerecord-4.1.12 lib/active_record/migration/join_table.rb
activerecord-4.1.12.rc1 lib/active_record/migration/join_table.rb
activerecord-4.1.11 lib/active_record/migration/join_table.rb
activerecord-4.1.10 lib/active_record/migration/join_table.rb
activerecord-4.1.10.rc4 lib/active_record/migration/join_table.rb
activerecord-4.1.10.rc3 lib/active_record/migration/join_table.rb