enum_help 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/enum_help/i18n.rb +1 -1
- data/lib/enum_help/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: 75f95d6a74f8b6e386e27fece0f7d34c76335020
|
4
|
+
data.tar.gz: 560fd5a99b601fc46e55f1a0307c23b0e2fb3275
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b39a30445d6c1089e5b138343a5386aa892a4fc14e0a34ace569df1b56d95e8f3cba81b6d6ec16c9a745e763cd3106d1b8890ddcc9074c7132aa201a11befb55
|
7
|
+
data.tar.gz: 37a7ca60dd022b157307ecb21d68802011b385182df9deb6c663b16d86070049f33142d959a46238566404d410c6754a2a7c0dd5e9beaaca6d5dedcda8cc8ae6
|
data/README.md
CHANGED
@@ -76,7 +76,7 @@ Other arguments for `simple_form` are supported perfectly.
|
|
76
76
|
e.g.
|
77
77
|
|
78
78
|
```erb
|
79
|
-
<%= f.input :status, prompt: 'Please select a
|
79
|
+
<%= f.input :status, prompt: 'Please select a status' %>
|
80
80
|
|
81
81
|
<%= f.input :status, as: :string %>
|
82
82
|
```
|
@@ -94,7 +94,7 @@ e.g.
|
|
94
94
|
I18n local file example:
|
95
95
|
|
96
96
|
```yaml
|
97
|
-
# config/
|
97
|
+
# config/locales/model/order.zh-cn.yml
|
98
98
|
zh-cn:
|
99
99
|
enums:
|
100
100
|
order:
|
data/lib/enum_help/i18n.rb
CHANGED
@@ -51,7 +51,7 @@ module EnumHelp
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.translate_enum_label(klass, attr_name, enum_label)
|
54
|
-
::I18n.t("enums.#{klass.to_s.underscore}.#{attr_name}.#{enum_label}", default: enum_label)
|
54
|
+
::I18n.t("enums.#{klass.to_s.underscore.gsub('/', '.')}.#{attr_name}.#{enum_label}", default: enum_label.humanize)
|
55
55
|
end
|
56
56
|
|
57
57
|
end
|
data/lib/enum_help/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enum_help
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lester Zhao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|