From 7d3908ec413d0f2dd2718f7783739981d4ac2c95 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Tue, 17 Mar 2026 23:31:42 -0400 Subject: [PATCH] fixed estimate#sync --- app/controllers/estimate_controller.rb | 7 ------- config/routes.rb | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/app/controllers/estimate_controller.rb b/app/controllers/estimate_controller.rb index b5d055c..33cd576 100644 --- a/app/controllers/estimate_controller.rb +++ b/app/controllers/estimate_controller.rb @@ -77,13 +77,6 @@ class EstimateController < ApplicationController redirect_back fallback_location: root_path, flash: { error: I18n.t(:notice_estimate_not_found) } end - def sync - Estimate.sync - redirect_to :home, flash: { notice: I18n.t(:label_syncing) } - end - - private - # Logs messages with a consistent prefix for easier debugging. def log(msg) Rails.logger.info "[EstimateController] #{msg}" diff --git a/config/routes.rb b/config/routes.rb index 390d9d9..2f59360 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -23,7 +23,7 @@ get 'estimates/sync', to: 'estimate#sync' post 'qbo/webhook', to: 'qbo#webhook' # Estimate & Invoice PDF -get 'estimates/:id', to: 'estimate#show', as: :estimate +get 'estimates/sync', to: 'estimate#sync' get 'estimates/doc/', to: 'estimate#doc', as: :estimate_doc get 'invoices/:id', to: 'invoice#show', as: :invoice