Update vehicles_controller.rb

This commit is contained in:
2016-05-06 06:59:21 -04:00
parent 259a4fdc58
commit 822dc4b705

View File

@@ -56,6 +56,7 @@ class VehiclesController < ApplicationController
# update a specific vehicle
def update
@customers = Customer.all.order(:name)
@vehicle = Vehicle.find_by_id(params[:id])
if @vehicle.update_attributes(params[:vehicle])
flash[:success] = "Vehicle updated"