From 8b7cc3ffb6b4840abe142f2b73b1b3ff2fb2938b Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 12 May 2016 10:10:58 -0400 Subject: [PATCH] Update vehicles_controller.rb --- app/controllers/vehicles_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/vehicles_controller.rb b/app/controllers/vehicles_controller.rb index 7d879dc..03bdf81 100644 --- a/app/controllers/vehicles_controller.rb +++ b/app/controllers/vehicles_controller.rb @@ -54,7 +54,9 @@ class VehiclesController < ApplicationController def edit begin @vehicle = Vehicle.find_by_id(params[:id]) - @customers = Customer.without_callback(:initialize, :after, :pull).all.order(:name) + Customer.without_callback(:initialize, :after, :pull) do + @customers = .all.order(:name) + end rescue ActiveRecord::RecordNotFound render_404 end