Merge branch 'master' of https://github.com/ZeusWPI/Tab into user-table-fix
This commit is contained in:
commit
692de0228e
3 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,7 @@ class UsersController < ApplicationController
|
|||
|
||||
def show
|
||||
@user = User.find_by(name: params[:id]) || User.new
|
||||
authorize! :read, @user
|
||||
respond_to do |format|
|
||||
format.html { @transaction = Transaction.new }
|
||||
format.json { render json: @user }
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
%span.input-group-addon
|
||||
%span.glyphicon.glyphicon-euro
|
||||
= f.number_field :euros, value: amount(@transaction.amount),
|
||||
placeholder: "Bedrag", step: 0.01, min: (0.01 unless current_user.penning),
|
||||
class: "form-control", size: 20, max: Rails.application.config.maximum_amount/100, required: true
|
||||
placeholder: "Amount", step: 0.01, min: (0.01 unless current_user.penning),
|
||||
class: "form-control", size: 20, required: true,
|
||||
max: (Rails.application.config.maximum_amount/100 unless current_user.penning)
|
||||
= f.submit "Send it!", class: "pure-button pure-button-primary btn"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%h2= @user.name
|
||||
%h2= "#{@user.name} (balance: #{@user.balance/100.0})"
|
||||
|
||||
= render 'transactions/new'
|
||||
|
||||
|
|
Loading…
Reference in a new issue