Fix mysql error

This commit is contained in:
nasia 2017-07-14 00:42:10 +03:00
parent b4ad2ea738
commit 6831c000c9
2 changed files with 2 additions and 1 deletions

View file

@ -2,7 +2,7 @@ class Booth < ActiveRecord::Base
include ActiveRecord::Transitions
belongs_to :conference
has_many :booth_requests
has_many :booth_requests, dependent: :destroy
has_many :users, through: :booth_requests
has_one :submitter_booth_user, -> { where(role: 'submitter') }, class_name: 'BoothRequest'

View file

@ -57,6 +57,7 @@ class User < ActiveRecord::Base
has_many :subscriptions, dependent: :destroy
has_many :tracks, foreign_key: 'submitter_id'
has_many :booth_requests
has_many :booth_requests, dependent: :destroy
has_many :booths, through: :booth_requests
accepts_nested_attributes_for :roles