Add indexes to create_join_table method #7028

Merged
merged 1 commit into from Jul 18, 2012
Commits on Jul 17, 2012
  1. Add join table migration generator

    lexmag committed Jul 10, 2012
    For instance, running
    
        rails g migration CreateMediaJoinTable artists musics:uniq
    
    will create a migration with
    
        create_join_table :artists, :musics do |t|
          # t.index [:artist_id, :music_id]
          t.index [:music_id, :artist_id], unique: true
        end