Introduce an association between User and Event

Introduce an association between User and Event for the user schedule. As there was already a relation call users in Event the new relation is called public_users. And for the same reason the relation in Event is called public_events.
This commit is contained in:
Ana 2016-08-11 16:38:39 +02:00 committed by Ana María Martínez Gómez
parent 89af26bf18
commit 7f7375b7db
4 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,8 @@
class CreateEventsUsers < ActiveRecord::Migration
def change
create_table :events_users, id: false do |t|
t.references :event
t.references :user
end
end
end