raise when user not found

This commit is contained in:
Josh 2018-06-25 15:51:23 -04:00
parent 7c6174edc5
commit f0011a564e
1 changed files with 2 additions and 7 deletions

View File

@ -37,7 +37,7 @@ class UsersController < ApplicationController
end
end
# PATCH /u/:user_uid
# PATCH /u/:user_uid/edit
def update
if params[:setting] == "password"
# Update the users password.
@ -87,12 +87,7 @@ class UsersController < ApplicationController
private
def find_user
@user = User.find_by(uid: params[:user_uid])
unless @user
# Handle user does not exist.
end
@user = User.find_by!(uid: params[:user_uid])
end
def ensure_unauthenticated