ui_bibz 3.0.4 → 3.0.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: 2d1035c2c040919bc8d95ea88c10a9ec9d193ad0a065a2051d4bb50859f6f790
4
- data.tar.gz: d6d98df20222b1b34dbf14cd8ef0d0ccdc9d1273b719ea91ba6f182a85d8958f
3
+ metadata.gz: 84252ec73fb2776633eb463f7f3028ddb407d5f8ca8e3ca689417dd2c59f91da
4
+ data.tar.gz: eb7688183e18d6e0d9485d6a314ec51678be3915e9479a49486dc611b1c483ae
5
5
  SHA512:
6
- metadata.gz: a673392058615c477d62b5b5cc9db1f5c5a7fef1fd8d37e00553c33dedd198e6f32b7b318f55b3cb7dec88c05c444442a158b93e80320f5d3eb17feeb8cd3d17
7
- data.tar.gz: acc63ee66aab8fa6a185e57bb2f67700781c0616e3a2ada4279a1c122aaa7a35c25ae84c95d16e79bf372e1f311bc40f1adbc4956878be0e509800eac6b993b4
6
+ metadata.gz: bdfcc7bb97485f27732c0c2ddbfc13e08715bde5058d41057a87b83e4d009d3c32ae5f378ce8e41d984c14b2a43e4d7c7de435b776eb1d844362530759462e77
7
+ data.tar.gz: 679e4e6900dcaaec3dc3439b7c880f26b600884b0ecda99425d2b5d6056b9e6604a18b8e768fe55c2c814197524af12f6ae78cc959852d737369dd806339bdef
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (3.0.4)
4
+ ui_bibz (3.0.5)
5
5
  will-paginate-i18n
6
6
  will_paginate (~> 3.3.0)
7
7
  will_paginate-bootstrap4
@@ -149,7 +149,7 @@ GEM
149
149
  rails-dom-testing (2.0.3)
150
150
  activesupport (>= 4.2.0)
151
151
  nokogiri (>= 1.6)
152
- rails-html-sanitizer (1.4.1)
152
+ rails-html-sanitizer (1.4.2)
153
153
  loofah (~> 2.3)
154
154
  railties (6.1.4.1)
155
155
  actionpack (= 6.1.4.1)
@@ -170,7 +170,7 @@ GEM
170
170
  rubocop-ast (>= 1.9.1, < 2.0)
171
171
  ruby-progressbar (~> 1.7)
172
172
  unicode-display_width (>= 1.4.0, < 3.0)
173
- rubocop-ast (1.10.0)
173
+ rubocop-ast (1.11.0)
174
174
  parser (>= 3.0.1.1)
175
175
  rubocop-minitest (0.15.0)
176
176
  rubocop (>= 0.90, < 2.0)
data/lib/ui_bibz/infos.rb CHANGED
@@ -12,6 +12,6 @@ module UiBibz
12
12
  REPO = 'git+https://github.com/thooams/ui_bibz.git'
13
13
  EMAIL = 'thomas@hummel.link'
14
14
  AUTHOR = 'Thooams [Thomas HUMMEL]'
15
- VERSION = '3.0.4'
15
+ VERSION = '3.0.5'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -7,5 +7,9 @@ module UiBibzInputs
7
7
  def input(_wrapper_options)
8
8
  UiBibz::Ui::Core::Forms::Files::FileField.new(input_attribute_name, options, input_html_options).render
9
9
  end
10
+
11
+ def input_attribute_name
12
+ options[:multiple] ? "#{super}[]" : super
13
+ end
10
14
  end
11
15
  end
@@ -59,10 +59,13 @@ module UiBibz::Ui::Core::Forms::Files
59
59
  end
60
60
 
61
61
  def format_value(value)
62
- if value.is_a? ActiveStorage::Attached::One
62
+ case value
63
+ when ActiveStorage::Attached::One
63
64
  return '' unless value.attached?
64
65
 
65
66
  return value.attachment.blob.filename
67
+ when ActiveStorage::Attached::Many
68
+ return ''
66
69
  end
67
70
 
68
71
  value.to_s
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ui_bibz
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thooams [Thomas HUMMEL]
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-23 00:00:00.000000000 Z
11
+ date: 2021-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails