Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.34 KB

README.md

File metadata and controls

51 lines (33 loc) · 1.34 KB

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 [email protected] under The MIT License.