mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Fixed filter_vehicles_by_customer method
This commit is contained in:
@@ -34,10 +34,8 @@ class CustomersController < ApplicationController
|
||||
|
||||
autocomplete :customer, :name, :full => false, :extra_data => [:id]
|
||||
|
||||
def autocomplete_customer_vehicles
|
||||
customer = Customer.find_by_id(params[:term])
|
||||
items = customer.vehicles if customer
|
||||
render :json => items.to_json if items
|
||||
def filter_vehicles_by_customer
|
||||
@filtered_vehicles = Vehicle.all.where(customer_id: params[:selected_customer])
|
||||
end
|
||||
|
||||
# display a list of all customers
|
||||
@@ -144,10 +142,6 @@ class CustomersController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def filter_vehicles_by_customer
|
||||
@filtered_vehicles = Customer.find(customer_id: params[:selected_customer]).vehicles
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def only_one_non_zero?( array )
|
||||
|
||||
Reference in New Issue
Block a user