Added missing to_s method

This commit is contained in:
2026-01-29 21:36:50 -05:00
parent f023cd246d
commit d3a8c05f50
2 changed files with 10 additions and 0 deletions

View File

@@ -15,6 +15,11 @@ class Estimate < ActiveRecord::Base
validates_presence_of :doc_number, :id validates_presence_of :doc_number, :id
self.primary_key = :id self.primary_key = :id
# returns a human readable string
def to_s
return self[:doc_number]
end
# sync all estimates # sync all estimates
def self.sync def self.sync
logger.info "Syncing ALL estimates" logger.info "Syncing ALL estimates"

View File

@@ -15,6 +15,11 @@ class Invoice < ActiveRecord::Base
validates_presence_of :doc_number, :id, :customer_id, :txn_date validates_presence_of :doc_number, :id, :customer_id, :txn_date
self.primary_key = :id self.primary_key = :id
# returns a human readable string
def to_s
return self[:doc_number]
end
# sync ALL the invoices # sync ALL the invoices
def self.sync def self.sync
logger.info "Syncing all invoices" logger.info "Syncing all invoices"