Skip to content

Instantly share code, notes, and snippets.

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 ccjr/324042 to your computer and use it in GitHub Desktop.
Save ccjr/324042 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 5-12. The db/migrate/20100307002156_create_articles_categories.rb file
class CreateArticlesCategories < ActiveRecord::Migration
def self.up
create_table :articles_categories, :id => false do |t|
t.references :article
t.references :category
end
end
def self.down
drop_table :articles_categories
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment