rails-tel_to_helper 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +40 -2
- data/lib/action_view/helpers/tel_to_helper.rb +2 -2
- data/lib/rails-tel_to_helper/version.rb +1 -1
- data/rails-tel_to_helper.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21a6fc9f6e693aa4819ba39d0a0f9a137b6238d7
|
4
|
+
data.tar.gz: 03ed5516024cf4699895f9721c82b3573721e6f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cce55782121f21fe626f861c226d4fab70b3e56171132926044b65d2c122647b9f005e55f4b4a263b550ab4b36402a1b79636e1360ae2fd43c30a758d02d6fb0
|
7
|
+
data.tar.gz: be79efa864d1abd0066dce0adbe1d2d2487468cb7e03da5a5d60e5f349a6512f14129b544269a96093e8dbbe6ae32efd1d9113820a8b0c0572078bfb53a0ede3
|
data/README.md
CHANGED
@@ -1,2 +1,40 @@
|
|
1
|
-
rails-tel_to_helper
|
2
|
-
|
1
|
+
# rails-tel_to_helper
|
2
|
+
|
3
|
+
[](http://badge.fury.io/rb/rails-tel_to_helper) [](http://travis-ci.org/swordray/rails-tel_to_helper) [](https://gemnasium.com/swordray/rails-tel_to_helper) [](https://codeclimate.com/github/swordray/rails-tel_to_helper)
|
4
|
+
|
5
|
+
Action View Telephone Link Helper.
|
6
|
+
|
7
|
+
## Requirements
|
8
|
+
|
9
|
+
* Ruby ~> 2.0
|
10
|
+
* Rails
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
Include the gem in your Gemfile:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
gem 'rails-tel_to_helper'
|
18
|
+
```
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
tel_to(number, name = nil, link_to_options = nil)
|
24
|
+
```
|
25
|
+
|
26
|
+
## Examples
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
= tel_to '400-881-6609'
|
30
|
+
= tel_to '400-881-6609', 'ihaveu.com Customer Service'
|
31
|
+
= tel_to '400-881-6609', 'ihaveu.com Customer Service', target: '_blank'
|
32
|
+
```
|
33
|
+
|
34
|
+
## Credits
|
35
|
+
|
36
|
+
* swordray @[ihaveu](http://www.ihaveu.com/home) @[shuhai](http://tw.shuhai.org/) @[leaf](http://leaf.iacger.com)
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
Copyright © 2014 Jianqiu Xiao <swordray@gmail.com> under The [MIT License](http://opensource.org/licenses/MIT).
|
@@ -7,8 +7,8 @@ module ActionView
|
|
7
7
|
# Creates a telephone link tag of the given +number+ and +name+. If +nil+
|
8
8
|
# is passed as the +name+ the value of the link itself will become the
|
9
9
|
# +number+. +options+ and +html_options+ will be same as +link_to.
|
10
|
-
def tel_to(number, name = nil,
|
11
|
-
link_to(h(name || number), "tel:#{h(number)}",
|
10
|
+
def tel_to(number, name = nil, link_to_options = nil)
|
11
|
+
link_to(h(name || number), "tel:#{h(number)}", link_to_options) if number.present?
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/rails-tel_to_helper.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.author = ["Jianqiu Xiao"]
|
9
9
|
s.email = ["swordray@gmail.com"]
|
10
10
|
s.homepage = "https://github.com/swordray/rails-tel_to_helper"
|
11
|
-
s.summary = "Action View Telephone Link Helper"
|
12
|
-
s.description = "Generate tel protocol link tag"
|
11
|
+
s.summary = "Action View Telephone Link Helper."
|
12
|
+
s.description = "Generate tel protocol link tag."
|
13
13
|
s.license = "MIT"
|
14
14
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-tel_to_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jianqiu Xiao
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: Generate tel protocol link tag
|
27
|
+
description: Generate tel protocol link tag.
|
28
28
|
email:
|
29
29
|
- swordray@gmail.com
|
30
30
|
executables: []
|
@@ -64,5 +64,5 @@ rubyforge_project:
|
|
64
64
|
rubygems_version: 2.2.2
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
|
-
summary: Action View Telephone Link Helper
|
67
|
+
summary: Action View Telephone Link Helper.
|
68
68
|
test_files: []
|