ActionView Telephone Link Helper
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
tel_to_helper.gemspec

README.md

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>

License

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