From c22272143d2a49041113cbda35cb12c5e85974a7 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Tue, 24 May 2016 11:58:35 -0400 Subject: [PATCH] Update customer.rb --- app/models/customer.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 8dc3de7..1df3550 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -20,7 +20,8 @@ class Customer < ActiveRecord::Base validates_presence_of :id, :name after_initialize :pull - alias_method_chain :save, :push + alias_method_chain :save_without_push, :save + alias_method_chain :save, :save_with_push self.primary_key = :id @@ -129,7 +130,7 @@ class Customer < ActiveRecord::Base # Push the updates def save_with_push - super + save_without_push begin #tries ||= 3 @details = Qbo.get_base(:customer).service.update(@details)