Update vehicles_controller.rb

This commit is contained in:
2016-05-12 10:10:58 -04:00
parent a1135115bc
commit 8b7cc3ffb6

View File

@@ -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