Update vehicles_controller.rb

This commit is contained in:
2016-08-03 21:20:08 -04:00
committed by GitHub
parent a3b5ad0cb0
commit fec59a7495

View File

@@ -108,4 +108,12 @@ class VehiclesController < ApplicationController
found_non_zero
end
# returns a dynamic list of vehicles owned by a customer
def update_vehicles
@vehicles = Customer.find_by_id(params[:customer].to_i).vehicles
respond_to do |format|
format.js
end
end
end