From b7e3ea9e3da799be1df3384dad3bc7b4eda8d525 Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Mon, 14 Mar 2022 19:39:36 -0400 Subject: [PATCH] estimate not e --- app/controllers/estimate_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/estimate_controller.rb b/app/controllers/estimate_controller.rb index 07b9816..fd37dd0 100644 --- a/app/controllers/estimate_controller.rb +++ b/app/controllers/estimate_controller.rb @@ -28,7 +28,7 @@ class EstimateController < ApplicationController estimate = get_estimate begin - send_data estimate.pdf, filename: "estimate #{e.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf" + send_data estimate.pdf, filename: "estimate #{estimate.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf" rescue redirect_to :back, :flash => { :error => "Estimate not found" } end @@ -41,7 +41,7 @@ class EstimateController < ApplicationController estimate = get_estimate begin - send_data estimate.pdf, filename: "estimate #{e.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf" + send_data estimate.pdf, filename: "estimate #{estimate.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf" rescue redirect_to :back, :flash => { :error => "Estimate not found" } end