attributes_for 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/app/helpers/attributes_for/rails/attributes_for_helper.rb +2 -1
- data/lib/attributes_for/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a77bbbefc4bed89673fc3d5f86ee4e1419bca50
|
4
|
+
data.tar.gz: b3efa478e7a0b1bc2c7d8aaa8d7b3036a1941f0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f663a360778b1214d9c83c5f3a4ff3cfc807bbc53f8bbf6f293b1ede88bba7610d9798a181f1331f32b125f9b629380cadfb19777350e5d507a6464590dd588
|
7
|
+
data.tar.gz: f59a6c21b57f4723c955e4a936568b0967ef39b3eaf868a52703716c16bb7a6b7c9077fd772f766a32a400dd9d71c41d663edf1fd4ef03a362e3d4edd53923d4
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.4.3] - 2015-09-08
|
4
|
+
### Fixed
|
5
|
+
- Made `phone` more rubust, now normalizes phone number before
|
6
|
+
formatting, thus handling plus and other characters.
|
3
7
|
|
4
8
|
## [0.4.2] - 2015-09-05
|
5
|
-
|
9
|
+
### Changed
|
6
10
|
- Use minitest instead of rspec
|
7
11
|
- Replaced `phony_rails` with `phony`.
|
8
12
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
[codeclimate]: https://codeclimate.com/github/blacktangent/attributes_for
|
3
3
|
[coveralls]: https://coveralls.io/r/blacktangent/attributes_for
|
4
4
|
[rubygems]: https://rubygems.org/gems/attributes_for
|
5
|
+
[fontawesome]: https://fortawesome.github.io/Font-Awesome
|
6
|
+
[fontawesomerails]: https://github.com/bokmann/font-awesome-rails
|
5
7
|
|
6
8
|
|
7
9
|
# AttributesFor
|
@@ -34,6 +36,10 @@ Run generator to add I18n locales:
|
|
34
36
|
|
35
37
|
$ rails generate attributes_for:install
|
36
38
|
|
39
|
+
Preferred icon and CSS framework is [Font Awesome][fontawesome] Bring
|
40
|
+
[Font Awesome][fontawesome] into your project by using
|
41
|
+
[font-awesome-rails][fontawesomerails] or your preferred method.
|
42
|
+
|
37
43
|
## Screenshot
|
38
44
|
![Screenshot](https://cloud.githubusercontent.com/assets/1222916/9355402/295b6324-46a3-11e5-9f8c-ff864b837cdd.png)
|
39
45
|
|
@@ -43,7 +43,8 @@ module AttributesFor
|
|
43
43
|
when :email
|
44
44
|
mail_to(value, value, title: human_name(attribute_name))
|
45
45
|
when :phone
|
46
|
-
|
46
|
+
phone_number = Phony.format(Phony.normalize(value.to_s), format: :international)
|
47
|
+
link_to(phone_number, "tel:#{phone_number}", title: human_name(attribute_name))
|
47
48
|
when :url
|
48
49
|
link_to(value, value, title: human_name(attribute_name))
|
49
50
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attributes_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ole J. Rosendahl
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|