add relationships for booths

This commit is contained in:
nasia 2017-05-30 13:05:13 +03:00
parent da6b5b8141
commit 3d9ac5a85f
8 changed files with 50 additions and 2 deletions

View file

@ -1,2 +1,7 @@
class Booth < ActiveRecord::Base
belongs_to :conference
has_many :booth_requests
has_many :users, through: :booth_requests
validate :title, presence: true
end