WIP | Louis | Adding client receipts

This commit is contained in:
Loos
2014-10-10 18:47:44 -05:00
parent 9fad8ded1b
commit 67ae0bf04b
7 changed files with 25 additions and 13 deletions
+8 -12
View File
@@ -19,22 +19,18 @@ class ClientsController < ApplicationController
def create
@client = Client.new(client_params)
respond_to do |format|
if @client.save
format.html { redirect_to @client, notice: 'Client was successfully created.' }
else
format.html { render action: 'new' }
end
if @client.save
redirect_to @client, notice: 'Client was successfully created.'
else
render action: 'new'
end
end
def update
respond_to do |format|
if @client.update(client_params)
format.html { redirect_to @client, notice: 'Client was successfully updated.' }
else
format.html { render action: 'edit' }
end
if @client.update(client_params)
redirect_to @client, notice: 'Client was successfully updated.'
else
render action: 'edit'
end
end
@@ -13,4 +13,8 @@ class FreecycleryController < ApplicationController
@available_bikes = Bike.available_for_freecyclery
end
def receipt
@client = Client.find(params[:client_id])
end
end
+1
View File
@@ -0,0 +1 @@
KITTENS