Skip to content

swordray/tel_to_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Deprecated for Rails 6.1 UrlHelper#phone_to

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages