Tuesday, September 25, 2007

Tutorial: Migration Table w/o IDs

When creating HABTM(Has And Belongs To Many) tables, you can create the migration table without an ID column this way:


create_table :events_users, :id => false do |t|
t.column :event_id, :integer
t.column :user_id, :integer
end

No comments: