Module: Fields::PhoneFieldHelper
- Defined in:
- app/helpers/fields/phone_field_helper.rb
Instance Method Summary collapse
Instance Method Details
#display_phone_number(phone_number) ⇒ Object
2 3 4 5 6 |
# File 'app/helpers/fields/phone_field_helper.rb', line 2 def display_phone_number(phone_number) return nil unless phone_number.present? phone_number_parsed = Phonelib.parse(phone_number) phone_number_parsed.full_international.gsub(/^\+#{phone_number_parsed.country_code}/, "<span class=\"text-muted\">+#{phone_number_parsed.country_code}</span>").html_safe end |