join with specific id

This commit is contained in:
joshua-arts
2018-06-03 14:57:30 -04:00
parent 140547d035
commit 79949b4aa6
5 changed files with 26 additions and 6 deletions

View File

@ -88,8 +88,9 @@ class User < ApplicationRecord
private
# Initializes a room for the user.
# Initializes a room for the user and assign a BigBlueButton user id.
def initialize_main_room
self.uid = "gl-#{(0...12).map { (65 + rand(26)).chr }.join.downcase}"
self.main_room = Room.create!(owner: self, name: firstname + "'s Room")
self.save
end