Sha256: 4fe63c050db92ea818c1184c9349a820ab84b1b2501275b3bffea5f8c0d3e1fb

Contents?: true

Size: 293 Bytes

Versions: 42

Compression:

Stored size: 293 Bytes

Contents

# frozen_string_literal: true

module Effective
  module TableRows
    class PhoneField < Effective::TableRow

      def content
        return unless value.present?

        digits = value.split('x').first.delete('^0-9')
        link_to(value, "tel:+1#{digits}")
      end

    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
effective_bootstrap-1.19.10 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.9 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.8 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.7 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.6 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.5 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.4 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.3 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.2 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.1 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.19.0 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.18.7 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.18.4 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.18.3 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.18.2 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.18.1 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.18.0 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.17.6 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.17.5 app/models/effective/table_rows/phone_field.rb
effective_bootstrap-1.17.4 app/models/effective/table_rows/phone_field.rb