phlexi-form 0.7.1 → 0.7.2

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: 694c2f691f7e7b48e3b5df89dc1bc16badcbf88d4cb3fe528f106385aa448d93
4
- data.tar.gz: e0f6d6c3a12b7db210030d3cebfa2223d117839484bf6da38351281b219c1f34
3
+ metadata.gz: 5efa476cb7e4856462046b6658c996843537b102f807e5c7c08a2d8e88520d11
4
+ data.tar.gz: 1938daa8358013cee51abd0b4d50188c99459c6b714470002e4ec26a77e0b224
5
5
  SHA512:
6
- metadata.gz: a269b67fc4679879244626a6734730f8b941a8fb1107837ecf057bb0d43c7003fe845f9614eb3f005a9cd594d2c2d048056f6aaf4858cb2be226c3b49d2cfb07
7
- data.tar.gz: a1b5899de6524100d3996d2594b0d544626c3e04df4c7c85f07b365864be73c0a957a10d5ac38d625d3622f47dbd20bd0bc2c826aa90904e8538fe1bff2a54fb
6
+ metadata.gz: a0b9918b54df47959563f801982e0cbfae8b2a22f21ea2900cb64be952c891b7df7702361255c09063b45a858ed4fc9445911bc73d1766edf3f91ed91000417a
7
+ data.tar.gz: 73de9965cf5106cefe30081ba2d2a822d725ec203cb26d4d1fd2f2be53b336fd56aa227c2935b85b6d405ddf9a4dca35096f010d98d4724285d9dbfd9c2d8df8
@@ -20,10 +20,17 @@ module Phlexi
20
20
 
21
21
  def selected?(option)
22
22
  if attributes[:multiple]
23
- @options_list ||= Array(field.value)
24
- @options_list.any? { |item| item.to_s == option.to_s }
23
+ field_value.any? { |item| item.to_s == option.to_s }
25
24
  else
26
- field.value.to_s == option.to_s
25
+ field_value.to_s == option.to_s
26
+ end
27
+ end
28
+
29
+ def field_value
30
+ if attributes[:multiple]
31
+ Array(field.value)
32
+ else
33
+ field.value
27
34
  end
28
35
  end
29
36
 
@@ -16,6 +16,8 @@ module Phlexi
16
16
  def build_input_attributes
17
17
  attributes[:type] = :file
18
18
  super
19
+
20
+ @include_hidden = attributes.delete(:include_hidden)
19
21
  # ensure we are always setting it to false
20
22
  attributes[:value] = false
21
23
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Phlexi
4
4
  module Form
5
- VERSION = "0.7.1"
5
+ VERSION = "0.7.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlexi-form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-29 00:00:00.000000000 Z
11
+ date: 2025-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex