initial commit

This commit is contained in:
Josh
2018-05-07 16:06:01 -04:00
commit 4037b6304e
125 changed files with 2493 additions and 0 deletions

17
app/models/room.rb Normal file
View File

@ -0,0 +1,17 @@
class Room < ApplicationRecord
before_create :set_uid
belongs_to :user
has_many :meetings
def owned_by?(user)
user.room == self
end
private
def set_uid
self.uid = Digest::SHA1.hexdigest(user.uid + user.provider + user.username)[0..12]
end
end