mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
lk | remove unused fields on bikes & fix some formatting
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user