Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created October 6, 2017 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/d15fd8aa495204d5e7f235e103591184 to your computer and use it in GitHub Desktop.
Save codecademydev/d15fd8aa495204d5e7f235e103591184 to your computer and use it in GitHub Desktop.
Codecademy export
class CreateAlbums < ActiveRecord::Migration
def change
create_table :albums do |t|
t.string :cover
t.string :artist
t.string :title
t.has_many :tracks
t.timestamps
end
end
end
class Album < ActiveRecord::Base
has_many :tracks
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment