From a1135115bcee14a518d730df33610e2d8c497fd7 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 12 May 2016 10:08:44 -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 2064e1a..7d879dc 100644 --- a/app/controllers/vehicles_controller.rb +++ b/app/controllers/vehicles_controller.rb @@ -24,7 +24,9 @@ class VehiclesController < ApplicationController # return an HTML form for creating a new vehicle def new @vehicle = Vehicle.new - @customers = Customer.without_callback(:initialize, :after, :pull).all.order(:name) + Customer.without_callback(:initialize, :after, :pull) do + @customers = Customer.all.order(:name) + end end # create a new vehicle