Update customer.rb

This commit is contained in:
2019-06-25 11:54:26 -04:00
committed by GitHub
parent 9e9b29fef9
commit 6d176acc2b

View File

@@ -87,10 +87,10 @@ class Customer < ActiveRecord::Base
@details.mobile_phone = pn @details.mobile_phone = pn
end 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 def update_phone_number
begin begin
self.phone_number = self.primary_phone.tr('^0-9', '').to_i self.phone_number = self.primary_phone.tr('^0-9', '')
rescue rescue
return nil return nil
end end