Update vehicles_controller.rb

This commit is contained in:
2016-05-12 09:06:03 -04:00
parent a68c7d5803
commit fc93862528

View File

@@ -24,7 +24,7 @@ class VehiclesController < ApplicationController
# return an HTML form for creating a new vehicle
def new
@vehicle = Vehicle.new
@customers = Customer.all.order(:name)
@customers = Customer.without_callback(:initialize, :after, :pull).all.order(:name)
end
# create a new vehicle
@@ -52,7 +52,7 @@ class VehiclesController < ApplicationController
def edit
begin
@vehicle = Vehicle.find_by_id(params[:id])
@customers = Customer.all.order(:name)
@customers = Customer.without_callback(:initialize, :after, :pull).all.order(:name)
rescue ActiveRecord::RecordNotFound
render_404
end