mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 01:14:23 -05:00
Update vehicles_controller.rb
This commit is contained in:
@@ -95,6 +95,14 @@ class VehiclesController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# returns a dynamic list of vehicles owned by a customer
|
||||||
|
def update_vehicles
|
||||||
|
@vehicles = Customer.find_by_id(params[:customer_id].to_i).vehicles
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def only_one_non_zero?( array )
|
def only_one_non_zero?( array )
|
||||||
@@ -108,12 +116,4 @@ class VehiclesController < ApplicationController
|
|||||||
found_non_zero
|
found_non_zero
|
||||||
end
|
end
|
||||||
|
|
||||||
# returns a dynamic list of vehicles owned by a customer
|
|
||||||
def update_vehicles
|
|
||||||
@vehicles = Customer.find_by_id(params[:customer_id].to_i).vehicles
|
|
||||||
respond_to do |format|
|
|
||||||
format.js
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user