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.10.0 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.9.0 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.8.5 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.8.4 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.8.3 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.8.2 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.8.1 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.8.0 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.23 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.22 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.21 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.20 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.19 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.18 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.17 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.16 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.15 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.14 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.13 app/helpers/fields/phone_field_helper.rb
bullet_train-fields-1.7.12 app/helpers/fields/phone_field_helper.rb