thirteen-tien-len/app/controllers/rooms_controller.rb
2023-10-23 06:58:18 +00:00

17 lines
319 B
Ruby

class RoomsController < ApplicationController
before_action :skip_authorization
def new
end
def create
redirect_to room_path(SecureRandom.uuid)
end
def show
@client = Client.new(id: SecureRandom.uuid)
cookies.encrypted[:client_id] = @client.id
@room = Room.new(id: params[:id])
end
end