https://github.com/swordray/tel_to_helper
Deprecated for Rails 6.1 UrlHelper#phone_to
https://github.com/swordray/tel_to_helper
actionpack actionview rails ruby
Last synced: 9 months ago
JSON representation
Deprecated for Rails 6.1 UrlHelper#phone_to
- Host: GitHub
- URL: https://github.com/swordray/tel_to_helper
- Owner: swordray
- License: mit
- Created: 2014-03-16T08:38:01.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-01-24T09:13:02.000Z (over 4 years ago)
- Last Synced: 2025-10-08T03:56:29.699Z (9 months ago)
- Topics: actionpack, actionview, rails, ruby
- Language: Ruby
- Homepage:
- Size: 6.84 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tel_to_helper
[](http://badge.fury.io/rb/tel_to_helper) [](http://travis-ci.org/swordray/tel_to_helper) [](https://gemnasium.com/swordray/tel_to_helper) [](https://codeclimate.com/github/swordray/tel_to_helper)
Action View Telephone Link Helper.
## Requirements
* Ruby ~> 2.0
* Rails
## Installation
Include the gem in your Gemfile:
```ruby
gem 'tel_to_helper'
```
## Usage
The parameters is almost the same as `link_to` except pass phone number to `options`.
```ruby
tel_to(name = nil, options = nil, html_options = nil, &block)
```
## Examples
```ruby
tel_to '000-000-0000'
# => 000-000-0000
```
```ruby
tel_to 'My phone number', '000-000-0000'
# => My phone number
```
```ruby
tel_to '000-000-0000', 'My phone number', target: '_blank'
# => My phone number
```
## Sponsors
* [BaiLu ShuYuan](https://bailushuyuan.org)
## License
Copyright © 2016 Jianqiu Xiao under The [MIT License](http://opensource.org/licenses/MIT).