Merge branch 'master' of https://github.com/ZeusWPI/Tab into user-table-fix

This commit is contained in:
tl3ilaxu 2016-02-11 17:30:34 +01:00
commit 692de0228e
3 changed files with 5 additions and 3 deletions

View file

@ -8,6 +8,7 @@ class UsersController < ApplicationController
def show def show
@user = User.find_by(name: params[:id]) || User.new @user = User.find_by(name: params[:id]) || User.new
authorize! :read, @user
respond_to do |format| respond_to do |format|
format.html { @transaction = Transaction.new } format.html { @transaction = Transaction.new }
format.json { render json: @user } format.json { render json: @user }

View file

@ -13,6 +13,7 @@
%span.input-group-addon %span.input-group-addon
%span.glyphicon.glyphicon-euro %span.glyphicon.glyphicon-euro
= f.number_field :euros, value: amount(@transaction.amount), = f.number_field :euros, value: amount(@transaction.amount),
placeholder: "Bedrag", step: 0.01, min: (0.01 unless current_user.penning), placeholder: "Amount", step: 0.01, min: (0.01 unless current_user.penning),
class: "form-control", size: 20, max: Rails.application.config.maximum_amount/100, required: true 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" = f.submit "Send it!", class: "pure-button pure-button-primary btn"

View file

@ -1,4 +1,4 @@
%h2= @user.name %h2= "#{@user.name} (balance: #{@user.balance/100.0})"
= render 'transactions/new' = render 'transactions/new'