No release in over 3 years
Low commit activity in last 3 years
Generate tel protocol link tag.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

tel_to_helper

Gem Version Build Status Dependency Status Code Climate

Action View Telephone Link Helper.

Requirements

  • Ruby ~> 2.0
  • Rails

Installation

Include the gem in your Gemfile:

gem 'tel_to_helper'

Usage

The parameters is almost the same as link_to except pass phone number to options.

tel_to(name = nil, options = nil, html_options = nil, &block)

Examples

tel_to '000-000-0000'
# => <a href="tel:000-000-0000">000-000-0000</a>
tel_to 'My phone number', '000-000-0000'
# => <a href="tel:000-000-0000">My phone number</a>
tel_to '000-000-0000', 'My phone number', target: '_blank'
# => <a href="tel:000-000-0000" target="_blank">My phone number</a>

Sponsors

License

Copyright © 2016 Jianqiu Xiao swordray@gmail.com under The MIT License.