Sha256: c14bb7f67647846ef687cfa5454a7f33a97a798f685e141a0ea5dff92e66ea4e
Contents?: true
Size: 356 Bytes
Versions: 152
Compression:
Stored size: 356 Bytes
Contents
module Fields::PhoneFieldHelper 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 end
Version data entries
152 entries across 152 versions & 1 rubygems