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: cdfde30a6a04fbcb0baa5ee7ce36f9f00b3e8e9f520f6771b86018794216ca45
4
- data.tar.gz: 5dcf71453692a295cc1e341437ca7f076eb6e63edcc72be7415c35e286a0cdc5
3
+ metadata.gz: 055d9deb97999f8e9b5c91cf90ce270739c6726ab1d84fa7237b9ba4fae3d93b
4
+ data.tar.gz: 83e6428a219abd6903946346d7620e5c0a6433214931aa39a87810b3d6c11eef
5
5
  SHA512:
6
- metadata.gz: 0daf4516b1a9e653f0fb4867e2426730c82c120cf2c2bece7710ee9b0a7e9b1d4caa5df269e7e224e781386b54c7d07b2dee3001e0b77e67545da4cf406eea6a
7
- data.tar.gz: 253b6052c9a147c5a357556b09b2d8dcfe5adcfb68b3ddeeb9d6adf60e7b237e5e3f7f65a5caa370a698bb2d2492215d5f0d0048e9948fd5de00140aee3914a3
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
@@ -1,3 +1,3 @@
1
1
  module RailsAdminEnumConfigurable
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  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.1
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: 2018-05-13 00:00:00.000000000 Z
11
+ date: 2019-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport