mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Removed after init call back from customer
This commit is contained in:
@@ -18,9 +18,7 @@ class CustomersController < ApplicationController
|
||||
|
||||
# display a list of all customers
|
||||
def index
|
||||
Customer.without_callback(:initialize, :after, :pull) do
|
||||
@customers = Customer.paginate(:page => params[:page])
|
||||
end
|
||||
@customers = Customer.paginate(:page => params[:page])
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
@@ -24,9 +24,7 @@ class VehiclesController < ApplicationController
|
||||
# return an HTML form for creating a new vehicle
|
||||
def new
|
||||
@vehicle = Vehicle.new
|
||||
Customer.without_callback(:initialize, :after, :pull) do
|
||||
@customers = Customer.all.order(:name)
|
||||
end
|
||||
@customers = Customer.all.order(:name)
|
||||
end
|
||||
|
||||
# create a new vehicle
|
||||
@@ -55,9 +53,7 @@ class VehiclesController < ApplicationController
|
||||
begin
|
||||
@vehicle = Vehicle.find_by_id(params[:id])
|
||||
@customer = @vehicle.customer.id
|
||||
Customer.without_callback(:initialize, :after, :pull) do
|
||||
@customers = Customer.all.order(:name)
|
||||
end
|
||||
@customers = Customer.all.order(:name)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user