mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 09:10:43 -04:00
Update vehicles_controller.rb
This commit is contained in:
1 parent
b5d42fcd7b
commit
76ffda9cad
1 file changed
+2
-2
@@ -37,7 +37,7 @@ class VehiclesController < ApplicationController
|
||||
def show
|
||||
@vehicle = Vehicle.find_by_id(params[:id])
|
||||
if @vehicle
|
||||
@customer = @vehicle.qbo_customer.name if @vehicle.qbo_customer
|
||||
@customer = @vehicle.customer.name if @vehicle.customer
|
||||
else
|
||||
flash[:error] = "Vehicle Not Found"
|
||||
render :index
|
||||
@@ -47,7 +47,7 @@ class VehiclesController < ApplicationController
|
||||
# return an HTML form for editing a vehicle
|
||||
def edit
|
||||
@vehicle = Vehicle.find_by_id(params[:id])
|
||||
@customer = @vehicle.qbo_customer.id if @vehicle.qbo_customer
|
||||
@customer = @vehicle.customer.id if @vehicle.customer
|
||||
end
|
||||
|
||||
# update a specific vehicle
|
||||
|
||||
Reference in new issue
Block a user