From 4d94308bcc77894f3c38e186c96707bb195e8b88 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Wed, 3 Aug 2016 21:57:50 -0400 Subject: [PATCH] Update vehicles_controller.rb --- app/controllers/vehicles_controller.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/vehicles_controller.rb b/app/controllers/vehicles_controller.rb index aaf5268..545e7be 100644 --- a/app/controllers/vehicles_controller.rb +++ b/app/controllers/vehicles_controller.rb @@ -95,6 +95,14 @@ class VehiclesController < ApplicationController 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 def only_one_non_zero?( array ) @@ -107,13 +115,5 @@ class VehiclesController < ApplicationController end found_non_zero 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