mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
18 lines
No EOL
313 B
Ruby
18 lines
No EOL
313 B
Ruby
class Room < ActiveRecord::Base
|
|
attr_accessible :name, :size, :public
|
|
|
|
belongs_to :conference
|
|
has_many :events
|
|
|
|
before_create :generate_guid
|
|
|
|
private
|
|
|
|
def generate_guid
|
|
begin
|
|
guid = SecureRandom.urlsafe_base64
|
|
end while Person.where(:guid => guid).exists?
|
|
self.guid = guid
|
|
end
|
|
|
|
end |