Return balance for non-existing user

This commit is contained in:
benji 2016-02-02 15:24:26 +01:00
parent 61a85146ea
commit aa2b22358a

View file

@ -4,7 +4,7 @@ class UsersController < ApplicationController
before_action :authenticate_user!, except: :show before_action :authenticate_user!, except: :show
before_action :authenticate_user_or_client!, only: :show before_action :authenticate_user_or_client!, only: :show
load_and_authorize_resource load_and_authorize_resource except: :show
def show def show
@user = User.find_by_name(params[:id]) || User.new @user = User.find_by_name(params[:id]) || User.new