Return a new user when it doesn't exist
This commit is contained in:
parent
8c000efd9c
commit
61a85146ea
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ class UsersController < ApplicationController
|
|||
load_and_authorize_resource
|
||||
|
||||
def show
|
||||
@user = User.find(params[:id])
|
||||
@user = User.find_by_name(params[:id]) || User.new
|
||||
respond_to do |format|
|
||||
format.html { @transaction = Transaction.new }
|
||||
format.json { render json: @user }
|
||||
|
|
Loading…
Reference in a new issue