use route url helpers instead of hardcoding

This commit is contained in:
Zachary Chai
2017-02-17 16:05:59 -05:00
parent 16a1626130
commit 7873f640bc
3 changed files with 3 additions and 7 deletions

View File

@ -22,7 +22,7 @@ class SessionsController < ApplicationController
def create
@user = User.from_omniauth(request.env['omniauth.auth'])
session[:user_id] = @user.id
redirect_to @user.room_url
redirect_to meeting_room_url(resource: 'rooms', id: @user.encrypted_id)
rescue => e
logger.error "Error authenticating via omniauth: #{e}"
redirect_to root_path