snaptable 2.0.4 → 2.0.5

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: 1f5957fece386147993ccc0cf9bd674bd5ce4c27
4
- data.tar.gz: 64b6ff524003408f620b9e369debb289bcae2c99
3
+ metadata.gz: c55dc0580cf97a22c1845dc289b3f32a3286863b
4
+ data.tar.gz: 86aaf1bc56afc042624559c2c5f2f924f5ed1230
5
5
  SHA512:
6
- metadata.gz: 73ede377d2a08ba3f0357918e6bc7d9930ebd6dd90de8d99ca751b8c67499c0ccdb86af7748ea77747aa1f2a308f16c069545d29a9506db30f87762164fb0f92
7
- data.tar.gz: '09894bcb1c16b9f63a2ceb255d2c27db842d93de36685074347b1a54ab2a592a1017ac986215d90198cc946f4021f4135f39ad369caca05317b6c0a5d95320f4'
6
+ metadata.gz: b320f762bf32aedc96750abb98fd678969c3430a64534cbf4aca3a86b2ceed4e2ad9b3dd0a37d095edf270e2e7f96df00302f17ea0992d053f90cdfb8d4d6004
7
+ data.tar.gz: 356516f8fac06e0dddb7e2171da2406d63a751579dac918307a044e5548cf90619b83e6b807c3370d09d2dcdedba4bed228ece750e19b5d6ebc507a1bebd2489
data/README.md CHANGED
@@ -175,6 +175,7 @@ class ArticleTable < BaseTable
175
175
  end
176
176
 
177
177
  end
178
+ end
178
179
  ```
179
180
 
180
181
  ### Multiple tables
@@ -40,7 +40,7 @@ module Snaptable
40
40
  def format(attribute, attr_value)
41
41
  if attr_value.is_a?(Date) || attr_value.is_a?(Time) || attr_value.is_a?(DateTime)
42
42
  l attr_value, format: :snaptable
43
- elsif attribute.to_s.in? enums
43
+ elsif !attr_value.nil? && attribute.to_s.in?(enums)
44
44
  t "#{model.model_name.i18n_key}.#{attribute.to_s.pluralize}.#{attr_value}"
45
45
  else
46
46
  attr_value
@@ -1,3 +1,3 @@
1
1
  module Snaptable
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaptable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - khcr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-04 00:00:00.000000000 Z
11
+ date: 2018-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails