Skip to content

Instantly share code, notes, and snippets.

@yuhonas
Created May 7, 2013 06:57
Show Gist options
  • Save yuhonas/5530727 to your computer and use it in GitHub Desktop.
Save yuhonas/5530727 to your computer and use it in GitHub Desktop.
Bootstrap Rails dialable phone number view helper
def dialable_phone_number(number)
content_tag(:a,
number,
:class => 'visible-phone',
:href => "tel:#{number}"
) + content_tag(:span, number, :class => 'visible-desktop')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment