osem-fcy/app/models/booth.rb

17 lines
382 B
Ruby
Raw Normal View History

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