c80_shared 0.1.43 → 0.1.44

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: c5e1ad5b232097f8acd89f670491cfd1acaec3a91c10b74c7d97a91a66ec039a
4
- data.tar.gz: 61407007597fd0ccde75f732747afbec0080c4022677c9d4e37d0636aa875c82
3
+ metadata.gz: 1dd2465d133518a604b901bf6964c11b81c11354df473441261ecaef163d01d3
4
+ data.tar.gz: 6b701995e133346953f8a2c005dd9c02222ddcc7c3ebd3916459a37c96da0333
5
5
  SHA512:
6
- metadata.gz: 1b52cd23e30f689de05aabf8e1b96643ce79e883cfd7f339a658b87a5f299aa537998af999e84e6f29ce9dc19f73b2cf6299233c9fe8b6e633dae0c400a88a39
7
- data.tar.gz: 5d4a8861153ddb25ccbf5f45cfa1810aaff334ebc7da34adf8f0d2827f0560651681ec5d38cf4258fb131a080e17bbfbd1b0be717c72cc16081234b1d898601e
6
+ metadata.gz: 33ca148eac5178f72b6b2546e7ace92d6e94038da06b3f238162b2fda034bf4adcf708b8d6405772a231ffac5836caf81829e7430c2eb7d783ae710236973318
7
+ data.tar.gz: f0f6e99d2e70fec44b3c4ad6d42ed202e81d2e1b4a5a73b515b3c7118fda23d5f07f7e48475bd5cdb34e564fc70fcacb81e1bac81d7b7f6c68bc1144d6b15df5
@@ -11,7 +11,11 @@ module Custom
11
11
  return [] unless collection.is_a?(Array)
12
12
 
13
13
  collection = if options[:collection_is_not_hash]
14
- collection.map { |h| [ h.try(name).capitalize, h.try(id) ] }
14
+ collection.map do |h|
15
+ field = h.try(name)
16
+ label = options[:i18n].present? ? options[:i18n][field] : field.capitalize
17
+ [ label, h.try(id) ]
18
+ end
15
19
  else
16
20
  collection.map { |h| [ h[name], h[id] ] }
17
21
  end
@@ -1,3 +1,3 @@
1
1
  module C80Shared
2
- VERSION = "0.1.43"
2
+ VERSION = "0.1.44"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c80_shared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.43
4
+ version: 0.1.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - C80609A