phlexi-form 0.5.5 → 0.5.6

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: 8583b90522a61700dac8266304e8777df43ea499e53cd449acd70fd68c32d55a
4
- data.tar.gz: 5e9304c0e8be9e7770ddba399e63fb260c5038f0f7bda28fbd6a32b226e0ce12
3
+ metadata.gz: b9671f4f7fcb1593070bf2544eb6245cdcdf7fda5565a4596a0dd6a6849bc1e7
4
+ data.tar.gz: 541f135bab202a68032c4c77200fc8a9089db71fef4cab768b172f35bfd440e4
5
5
  SHA512:
6
- metadata.gz: fcf54a8f4b08e5bbed3973aaebcc2c95cb0d976a0946daf10e7d3ddd4eb338274ea3b6200e6548be68df597fe647fdc2e344f80a663b2e6246c3ff4c64eec03e
7
- data.tar.gz: 6741eeefed087421ee96c7b962606a8331800c2649c4447d62cb2bf1f39de28a9194aace3022a31ee661292f482b81075909ed96f29ced1422bb45a03ad9a4d8
6
+ metadata.gz: 249664388de34b3295df4a9889088c1faa0ac5ba6a6405561798c40a1473f74e3c73fc61d5db4854d6acb49948064d214fd7a722f8d3d7af2253cf83f98c9717
7
+ data.tar.gz: 84956947661e1b7f8f69134bd08302a74f7af64544aed0c1d2bee95ddde8ff788015c5e1cb3496acae1c6bc841f273afef2b936de6e1bbb3ccc58dd189c08583
@@ -105,11 +105,11 @@ module Phlexi
105
105
  yield if block_given?
106
106
  end
107
107
 
108
- def extract_input(params)
108
+ def extract_input(params, view_context: nil)
109
109
  params = params.to_unsafe_h if params.respond_to?(:to_unsafe_h)
110
110
  params = {} unless params.is_a?(Hash)
111
111
 
112
- call unless @_rendered
112
+ call(view_context: view_context) unless @_rendered
113
113
  @namespace.extract_input(params)
114
114
  end
115
115
 
@@ -10,7 +10,9 @@ module Phlexi
10
10
  namespace = build_namespace(0)
11
11
  @block.call(namespace)
12
12
 
13
- inputs = params[key].map { |param| namespace.extract_input([param]) }
13
+ params = params[key]
14
+ params = params.values if params.is_a?(Hash)
15
+ inputs = params.map { |param| namespace.extract_input([param]) }
14
16
  {key => inputs}
15
17
  end
16
18
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Phlexi
4
4
  module Form
5
- VERSION = "0.5.5"
5
+ VERSION = "0.5.6"
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.5.5
4
+ version: 0.5.6
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-11-03 00:00:00.000000000 Z
11
+ date: 2024-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex