rails_admin_enum_configurable 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 055d9deb97999f8e9b5c91cf90ce270739c6726ab1d84fa7237b9ba4fae3d93b
|
4
|
+
data.tar.gz: 83e6428a219abd6903946346d7620e5c0a6433214931aa39a87810b3d6c11eef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec4ba92dfa213e495b5b03581bcf5702fcfbd8157bd5ca37c7e636866c9f1d7043a76bbf0d80dc5e81f5b99940cdc9e7d42487eef4d7eac4600e9a9f72f47795
|
7
|
+
data.tar.gz: 74a487f5330922d0f467ddfa9218194d15b4432998d3de042ea70825f6c4bb7c05d597d1401381f31448e55335beb0b9aada59f92acb9d730b2ebc2dbaa6099c
|
@@ -25,9 +25,9 @@ module RailsAdminEnumConfigurable
|
|
25
25
|
if enum_method?(name)
|
26
26
|
attribute = name.to_s.match(/(.+)_enum/)[1]
|
27
27
|
if self.send(attribute.pluralize).is_a?(::Hash)
|
28
|
-
self.send(attribute.pluralize).keys.map{|k| [I18n.t("enums.#{self.to_s.underscore}.#{attribute}.#{k}"), k]}.to_h
|
28
|
+
self.send(attribute.pluralize).keys.map{|k| [I18n.t("enums.#{self.to_s.underscore}.#{attribute}.#{k}", default: k), k]}.to_h
|
29
29
|
elsif self.send(attribute.pluralize).is_a?(::Array)
|
30
|
-
self.send(attribute.pluralize).map{|k| I18n.t("enums.#{self.to_s.underscore}.#{attribute}.#{k}")}
|
30
|
+
self.send(attribute.pluralize).map{|k| I18n.t("enums.#{self.to_s.underscore}.#{attribute}.#{k}", default: k)}
|
31
31
|
else
|
32
32
|
raise "Unknown enum type. attribute: #{attribute}, type: #{self.send(attribute.pluralize).class}"
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_enum_configurable
|
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
|
- Kei Tsuchiya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|