mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 09:24:23 -05:00
Update customer.rb
This commit is contained in:
@@ -20,8 +20,7 @@ class Customer < ActiveRecord::Base
|
|||||||
validates_presence_of :id, :name
|
validates_presence_of :id, :name
|
||||||
|
|
||||||
after_initialize :pull
|
after_initialize :pull
|
||||||
alias_method :save_without_push, :save
|
|
||||||
alias_method :save, :save_with_push
|
|
||||||
|
|
||||||
self.primary_key = :id
|
self.primary_key = :id
|
||||||
|
|
||||||
@@ -129,7 +128,7 @@ class Customer < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Push the updates
|
# Push the updates
|
||||||
def self.save_with_push
|
def save_with_push
|
||||||
save_without_push
|
save_without_push
|
||||||
begin
|
begin
|
||||||
#tries ||= 3
|
#tries ||= 3
|
||||||
@@ -142,6 +141,9 @@ class Customer < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
alias_method :save_without_push, :save
|
||||||
|
alias_method :save, :save_with_push
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# pull the details
|
# pull the details
|
||||||
|
|||||||
Reference in New Issue
Block a user