swifter_enum 0.9.4 → 0.9.5

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: a0b96e6c66d225905968a0a5b44a921c1aa01c2d567a6ce215fa2021a88f64de
4
- data.tar.gz: f5a824043a596b0587195bc415784f411005e1d5b989ac0afa5a14a0f9b69893
3
+ metadata.gz: bc3b347202fe12dc7e9ee2c8fa4eb651c614ba0dad8e94ad1d7e8672ec4b277f
4
+ data.tar.gz: f93a2c4c0c713f89499ae18e80398757295ed15c4cb2b71b36c2254f121450d3
5
5
  SHA512:
6
- metadata.gz: 4b480834e9d30c76b3a59b113247a7ba41f51699af40be97d1183236dd33ec5fe49d231f1b4b29b2de15d8ce567ba98d3d6118a6811dd124994adc4ed7cb3440
7
- data.tar.gz: a3b43c3c21afcbab79ce070b0156298835a8f61c369411eb14271ffd72db48aaadb8906ebeee7b80af0bbaa592248636724a14c91c187fbeaffeb6988d1c0941
6
+ metadata.gz: 1d735965c2dd2a7db1e286285b3ec36871d3731f37fc824b11a0d1a7f7f5834b3de0be6568300df84cbbe13abcfc650b90a32a3dda42b8109df0b8d213cd6d6f
7
+ data.tar.gz: c733bb8c4abd3c67c7a98b22a8c27da3eff45f517ceab52e5938a59a691c6a406b0304914ef9028a3f6fce3830737c02dce9b57f6288c7ae0d6f0c52a7866e77
data/CHANGELOG.md CHANGED
@@ -19,4 +19,8 @@
19
19
 
20
20
  ## [0.9.4]
21
21
 
22
- - Add 'all_cases'
22
+ - Add 'all_cases'
23
+
24
+ ## [0.9.5]
25
+
26
+ - Fix translation method when value is nil (returns nil)
@@ -43,6 +43,8 @@ module SwifterEnum
43
43
  end
44
44
 
45
45
  def t
46
+ return nil if value.nil?
47
+
46
48
  I18n.t("swifter_enum.#{self.class.name.demodulize.underscore}.#{value}")
47
49
  end
48
50
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SwifterEnum
4
- VERSION = "0.9.4"
4
+ VERSION = "0.9.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swifter_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Jonson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-13 00:00:00.000000000 Z
11
+ date: 2024-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord