Use symbols

This commit is contained in:
2026-01-30 16:58:14 -05:00
parent defeec7f8e
commit c3d7c1c867
11 changed files with 35 additions and 35 deletions

View File

@@ -36,7 +36,7 @@ class EstimateController < ApplicationController
estimate = get_estimate
begin
send_data estimate.pdf, filename: "estimate #{estimate.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
@@ -49,7 +49,7 @@ class EstimateController < ApplicationController
estimate = get_estimate
begin
send_data estimate.pdf, filename: "estimate #{estimate.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

View File

@@ -45,7 +45,7 @@ class InvoiceController < ApplicationController
ref = invoice.doc_number
end
send_data @pdf, filename: "invoice #{ref}.pdf", disposition: 'inline', type: "application/pdf"
send_data @pdf, filename: "invoice #{ref}.pdf", disposition: :inline, type: "application/pdf"
end
rescue
redirect_to :back, flash: { error: "Invoice not found" }

View File

@@ -92,10 +92,10 @@ class QboController < ApplicationController
data = params.as_json
end
# Process the information
entities = data['eventNotifications'][0]['dataChangeEvent']['entities']
entities = data['eventNotifications'][0]['dataChangeEvent'][:entities]
entities.each do |entity|
id = entity['id'].to_i
name = entity['name']
id = entity[:id].to_i
name = entity[:name]
logger.info "Casting #{name.constantize} to obj"
@@ -106,7 +106,7 @@ class QboController < ApplicationController
obj.destroy(entity['deletedId']) if entity['deletedId']
#Check to see if we are deleting a record
if entity['operation'].eql? "Delete"
if entity[:operation].eql? "Delete"
obj.destroy(id)
#if not then update!
else