mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Merge branch 'master' of github.com:rickbarrette/redmine_qbo
This commit is contained in:
@@ -24,9 +24,9 @@ class VehiclesController < ApplicationController
|
||||
# return an HTML form for creating a new vehicle
|
||||
def new
|
||||
@vehicle = Vehicle.new
|
||||
Customer.skip_callback(:initialize, :after, :get_details)
|
||||
Customer.skip_callback(:find, :after, :get_details)
|
||||
@customers = Customer.all.order(:name)
|
||||
Customer.set_callback(:initialize, :after, :get_details)
|
||||
Customer.set_callback(:find, :after, :get_details)
|
||||
end
|
||||
|
||||
# create a new vehicle
|
||||
|
||||
@@ -18,7 +18,7 @@ class Customer < ActiveRecord::Base
|
||||
attr_accessible :name
|
||||
validates_presence_of :id, :name
|
||||
|
||||
after_initialize :get_details
|
||||
after_find :get_details, :unless
|
||||
|
||||
self.primary_key = :id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user