From 3a0e58c3dab6398f198b15bcf4c6aa643f067d68 Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Mon, 22 May 2023 07:34:18 -0400 Subject: [PATCH] Append last 4 of phone number to customers name --- app/models/customer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index ce9ba02..accb7f8 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -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