2017-05-17 13:31:27 +03:00
|
|
|
class Booth < ActiveRecord::Base
|
|
|
|
|
belongs_to :conference
|
|
|
|
|
has_many :booth_requests
|
|
|
|
|
has_many :users, through: :booth_requests
|
|
|
|
|
|
|
|
|
|
validates :title,
|
2017-06-10 23:50:31 +03:00
|
|
|
uniqueness: { case_sensitive: false },
|
2017-05-17 13:31:27 +03:00
|
|
|
presence: true
|
|
|
|
|
|
|
|
|
|
validates :description,
|
|
|
|
|
:reasoning,
|
|
|
|
|
:state,
|
2017-06-10 23:50:31 +03:00
|
|
|
:logo_link,
|
2017-05-17 13:31:27 +03:00
|
|
|
:conference_id,
|
|
|
|
|
presence: true
|
|
|
|
|
end
|