Module: ActionView::Helpers::TelToHelper
- Defined in:
- lib/action_view/helpers/tel_to_helper.rb
Overview
Action View Telephone Link Helper
Instance Method Summary collapse
-
#tel_to(number, name = nil, link_to_options = nil) ⇒ Object
Creates a telephone link tag of the given
number
andname
.
Instance Method Details
#tel_to(number, name = nil, link_to_options = nil) ⇒ Object
Creates a telephone link tag of the given number
and name
. If nil
is passed as the name
the value of the link itself will become the number
. options
and html_options
will be same as +link_to.
10 11 12 |
# File 'lib/action_view/helpers/tel_to_helper.rb', line 10 def tel_to(number, name = nil, = nil) link_to(h(name || number), "tel:#{h(number)}", ) if number.present? end |