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
|
|
|
|
|
|
2017-06-06 21:36:18 +03:00
|
|
|
validates :title,
|
2017-05-17 13:31:27 +03:00
|
|
|
uniqueness: { case_sensitive: fasle},
|
|
|
|
|
presence: true
|
|
|
|
|
|
|
|
|
|
validates :description,
|
|
|
|
|
:reasoning,
|
|
|
|
|
:state,
|
|
|
|
|
:logo_link
|
|
|
|
|
:conference_id,
|
|
|
|
|
presence: true
|
|
|
|
|
end
|