From 6d176acc2b6945d71d4d952626c0f2631c8b33cc Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Tue, 25 Jun 2019 11:54:26 -0400 Subject: [PATCH] Update customer.rb --- app/models/customer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 9f5b3a6..bc3fb8d 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -87,10 +87,10 @@ class Customer < ActiveRecord::Base @details.mobile_phone = pn end - # update the localy stored phone number as a plain int + # update the localy stored phone number as a plain string with no special chars def update_phone_number begin - self.phone_number = self.primary_phone.tr('^0-9', '').to_i + self.phone_number = self.primary_phone.tr('^0-9', '') rescue return nil end