Sha256: b4afc5cbdc244c5d9aa9e9b040fceec47d6b68115ecb3ab6a92ca2e78e7e64c9
Contents?: true
Size: 409 Bytes
Versions: 17
Compression:
Stored size: 409 Bytes
Contents
module EvilFront::Helpers # Render link with phone number. It will remove all non-digits symbols from # phone number and format `tel:` protocol URI. # # label Contact us: # = tel('+7 (495) 660−83−79') def tel(number, args = { }) args[:href] = "tel:" + number.gsub(/[^\d\+]/, '') args[:class] = (['tel', args[:class]]).compact.join(' ') content_tag(:a, number, args) end end
Version data entries
17 entries across 17 versions & 1 rubygems