Append last 4 of phone number to customers name

This commit is contained in:
2023-05-22 07:34:18 -04:00
parent 26433c9020
commit 3a0e58c3da

View File

@@ -23,7 +23,7 @@ class Customer < ActiveRecord::Base
# returns a human readable string
def to_s
return name
return "#{self[:name]} - #{phone_number.split(//).last(4).join unless phone_number.nil?}"
end
# Convenience Method