From 62ac1bf2952d59983df969be91588da971d2c65e Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Mon, 29 Feb 2016 09:42:51 -0500 Subject: [PATCH] Update qbo_estimate.rb Fixed Loop --- app/models/qbo_estimate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/qbo_estimate.rb b/app/models/qbo_estimate.rb index 16c5b64..b30ded6 100644 --- a/app/models/qbo_estimate.rb +++ b/app/models/qbo_estimate.rb @@ -22,7 +22,7 @@ class QboEstimate < ActiveRecord::Base estimates = get_base.service.all # Update the item table - service.all.each { |estimate| + estimates.each { |estimate| qbo_estimate = QboEstimate.find_or_create_by(id: estimate.id) qbo_estimate.doc_number = estimate.doc_number qbo_estimate.save!