activeadmin-localize 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93a887afdea40530f00d316e271a0912f5b57a691c3226e85c83a2b6962f1fbb
4
- data.tar.gz: db4a26df90d8b73e30f658e5190cd35ab02576ea9bf8d316de6074d2528b272a
3
+ metadata.gz: ed53728f395d11887d5353ebb33ffa2ae8e7af3f03ea28016d006315795b8562
4
+ data.tar.gz: 66089a77112366424009fb6524b99436f63b8caf2de9a3d5c4c2221c329faf00
5
5
  SHA512:
6
- metadata.gz: 230cb4496f0cc339025d5866a550e88ba8ce7136dba2ffcf614714aa5a95caadcac725cabdff5000ff8e0f10acea72bc6d26a1484e3b130803b9623e0bdf11c2
7
- data.tar.gz: 18034418327ae0778c9f2a436f50fa9cfe85b3d0ba73a98a941b15d57ce36ff55d93da48c436993b92013d01076ec76fb5787a1cf4f9913d17376aa7efd3399b
6
+ metadata.gz: e768e000172edf331dc61274ab695362005fd41b2a37d84afa446dafd3870285de9606ab401e88a194507f49370ebc1d7a1353c841cbd2c9ea7f8f32507465b0
7
+ data.tar.gz: ed76871dc63886af0356144d9fb8d34e41a89d7f855999db075f81175f6278ed7f7b5c5134e8e80e051d6c12c8147d80064471c0cecd80c63be669b5b360026e
@@ -26,10 +26,13 @@ module ActiveAdmin
26
26
  @collection.each do |record|
27
27
  data = nil
28
28
  I18n.with_locale locale do
29
+ val = record.send(title)
29
30
  data = content_tag :div do
30
- (image_tag("activeadmin-localize/#{locale.to_s}.svg", alt: locale.to_s, title: locale.to_s, width: 20, height: 15) +
31
- ' ' +
32
- CGI.escapeHTML(record.send(title))).html_safe
31
+ (
32
+ image_tag("activeadmin-localize/#{locale.to_s}.svg", alt: locale.to_s, title: locale.to_s, width: 20, height: 15) +
33
+ ' ' +
34
+ (val.blank? ? "-" : CGI.escapeHTML(val)).html_safe
35
+ )
33
36
  end
34
37
  end
35
38
  td data
@@ -47,7 +50,6 @@ module ActiveAdmin
47
50
  def default_class_name
48
51
  'attributes_table'
49
52
  end
50
-
51
53
  end
52
54
  end
53
55
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module Localize
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-localize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Tv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-05 00:00:00.000000000 Z
11
+ date: 2019-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin