Return a new user when it doesn't exist

This commit is contained in:
benji 2016-02-02 15:20:29 +01:00
parent 8c000efd9c
commit 61a85146ea

View file

@ -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 }