Skip to content

Instantly share code, notes, and snippets.

@bansalakhil
Created August 20, 2012 09:01
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 bansalakhil/3402488 to your computer and use it in GitHub Desktop.
Save bansalakhil/3402488 to your computer and use it in GitHub Desktop.
Edge rails: Now create HABTM join tables easily using migration helper
# Edge rails you can do:
create_join_table :products, :categories
# Earlier:
create_table :categories_products, :id => false do |td|
td.integer :product_id, :null => false
td.integer :category_id, :null => false
end
# http://webonrails.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment