First checkin

This commit is contained in:
Matt Barringer 2013-01-07 09:04:09 +01:00
parent f207e2c8b7
commit 90b30db9e8
260 changed files with 37349 additions and 0 deletions

18
app/models/room.rb Normal file
View file

@ -0,0 +1,18 @@
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