Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
module TelHelper
# Erstellt einen <a href="tel:..."> link.
def tel_to(telephone_number, name = nil, html_options = {})
href = html_escape telephone_number.to_s.strip.sub(/\A\+/, '00').gsub(/(\(.+\))/, '').gsub(/[^\d]/, '')
content_tag "a", name || telephone_number, html_options.stringify_keys.merge("href" => "tel:#{href}".html_safe)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.