rails_string_enum 0.1.0 → 0.1.1
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/lib/rails_string_enum/string_enum.rb +3 -2
- data/lib/rails_string_enum/version.rb +1 -1
- data/rails_string_enum-0.1.0.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 91160b67fc43b52286f703fdeb81f1485864b06e
|
|
4
|
+
data.tar.gz: 22a9810d88bf3354723a3a667d27f831c42cb719
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12847c8cde438c6dbce629196271e5cbb1a12e79a7fada6ea426f6810499cdb68e4ea09314415ddc88f65c59c0dbe5774237d6d87759a5dcf8df718655de2e51
|
|
7
|
+
data.tar.gz: 90cdd77edc16c4bf5ccdda92d748a6722d71e14d12ce7cf3e38bcb3235c7563290f77aff4158b028581a42f3931fa53043f4eeec67949fc578bfaf8702cb1924
|
|
@@ -100,8 +100,9 @@ module RailsStringEnum
|
|
|
100
100
|
def define_collection_i18n_method_for_value(klass, attr_name, i18n_scope)
|
|
101
101
|
attr_i18n_method_name = "#{attr_name}_i18n"
|
|
102
102
|
|
|
103
|
-
klass.
|
|
104
|
-
def #{attr_i18n_method_name}_for
|
|
103
|
+
klass.instance_eval <<-METHOD, __FILE__, __LINE__
|
|
104
|
+
def #{attr_i18n_method_name}_for(enum_label)
|
|
105
|
+
return nil unless enum_label
|
|
105
106
|
#{ruby_string_for_enum_label(klass, attr_name, i18n_scope)}
|
|
106
107
|
end
|
|
107
108
|
METHOD
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_string_enum
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ermolaev Andrey
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -70,6 +70,7 @@ files:
|
|
|
70
70
|
- lib/rails_string_enum/simple_form.rb
|
|
71
71
|
- lib/rails_string_enum/string_enum.rb
|
|
72
72
|
- lib/rails_string_enum/version.rb
|
|
73
|
+
- rails_string_enum-0.1.0.gem
|
|
73
74
|
- rails_string_enum.gemspec
|
|
74
75
|
homepage: https://github.com/ermolaev/rails_string_enum
|
|
75
76
|
licenses:
|