enum_help 0.0.14 → 0.0.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7af8f0949dd254a92a7bb439af880de5d05ad9f8
4
- data.tar.gz: 15c71d3eb00bf6fa0a2aa400129b9ae4d2246388
3
+ metadata.gz: 75f95d6a74f8b6e386e27fece0f7d34c76335020
4
+ data.tar.gz: 560fd5a99b601fc46e55f1a0307c23b0e2fb3275
5
5
  SHA512:
6
- metadata.gz: f5e119aa5242b8a35451a4e4e7f37315be76fa413fd445d0d9dd8a8b22e82eac7199bbaefefc79619b0cfdcc66b65ef4ecf24773a33a8c135eb8585b747dd729
7
- data.tar.gz: 0a6f6529c29db06ac3cb17a2627d95f7da3827c52e2b71ba0973158746d176db3726c380df5a3a4ffeb75fb7645a558ed9e3883f7f044a7818c115f816ac38f1
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 stauts' %>
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/locals/model/order.zh-cn.yml
97
+ # config/locales/model/order.zh-cn.yml
98
98
  zh-cn:
99
99
  enums:
100
100
  order:
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EnumHelp
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
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.14
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: 2015-03-07 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler