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

Version Path
bullet_train-fields-1.7.11 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.10 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.9 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.3 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.2 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.1 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.0 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.38 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.37 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.36 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.35 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.34 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.33 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.32 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.31 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.30 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.29 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.28 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.27 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.6.26 app/helpers/fields/phone_field_helper.rb