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