lk | remove unused fields on bikes & fix some formatting

This commit is contained in:
Louis Knapp
2015-09-18 17:25:06 -05:00
parent f30e9c6fed
commit 2c98232f46
11 changed files with 36 additions and 20 deletions
+2 -3
View File
@@ -51,12 +51,12 @@ class BikesController < ApplicationController
end
def mark_as_sold
current_date = Time.new.strftime("%Y-%m-%d")
current_date = Time.new.strftime("%Y-%m-%d")
@bike = Bike.find(params[:id])
if @bike.update_attribute(:date_sold, current_date)
redirect_to bikes_url, notice: @bike.name + ' was marked as sold on ' + current_date + '.'
else
render action: edit, notice: 'Bike sale date could not be updated'
render action: edit, notice: 'Bike sale date could not be updated'
end
end
@@ -82,7 +82,6 @@ class BikesController < ApplicationController
:log_number,
:purpose,
:serial_number,
:notes,
:tag_info,
:mechanic,
:completion_date,
+1 -1
View File
@@ -22,7 +22,7 @@ class ClientsController < ApplicationController
if @client.save
redirect_to @client, notice: 'Client was successfully created.'
else
render action: 'new'
render action: 'new'
end
end