From 00b1baa1f3665fff80e0fa6a20e6f1484a7ca03d Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 5 Mar 2026 21:33:49 -0500 Subject: [PATCH] Fixed create new customer --- app/models/customer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 7b56cfc..40af83d 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -35,7 +35,7 @@ class Customer < ActiveRecord::Base # Returns the details of the customer. If the details have already been fetched, it returns the cached version. Otherwise, it fetches the details from QuickBooks Online and caches them for future use. This method is used to access the customer's information in a way that minimizes unnecessary API calls to QBO, improving performance and reducing latency. def details - return Quickbooks::Model::Customer.new unless id.present? + return (@details ||= Quickbooks::Model::Customer.new) if new_record? @details ||= begin xml = Rails.cache.fetch(details_cache_key, expires_in: 10.minutes) do