mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
WIP | Louis | Adding client receipts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user