From d3a8c05f50dd5abcad1d5de55e27489c5d4f3ee4 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 29 Jan 2026 21:36:50 -0500 Subject: [PATCH] Added missing to_s method --- app/models/estimate.rb | 5 +++++ app/models/invoice.rb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/app/models/estimate.rb b/app/models/estimate.rb index 6de04b3..c93212a 100644 --- a/app/models/estimate.rb +++ b/app/models/estimate.rb @@ -14,6 +14,11 @@ class Estimate < ActiveRecord::Base belongs_to :customer validates_presence_of :doc_number, :id self.primary_key = :id + + # returns a human readable string + def to_s + return self[:doc_number] + end # sync all estimates def self.sync diff --git a/app/models/invoice.rb b/app/models/invoice.rb index 264895c..47b1460 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -14,6 +14,11 @@ class Invoice < ActiveRecord::Base belongs_to :customer validates_presence_of :doc_number, :id, :customer_id, :txn_date self.primary_key = :id + + # returns a human readable string + def to_s + return self[:doc_number] + end # sync ALL the invoices def self.sync