formalist 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/formalist/elements/many.rb +4 -2
- data/lib/formalist/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1323fdd5950cdc3185d1f5c97095c2b6b5a4c895122eb56e422a65a583b116cf
|
4
|
+
data.tar.gz: bf631eb58ccd943f01099a551cb5dc390897e96e84bee193054adb07d0c35e11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3846cadc6cafa398dbb644ed6963e793d644e28e0e4a428bf285a4d369c27285bbd77f99cf7a0f889dfd37665b0bdfaa70da4ebde74394400ff0d4954eacd53
|
7
|
+
data.tar.gz: 41a5a177e35653ce0afc4ea48d5760dc80b9ff35728bdd558b2163d9530acf1a84741983bb571372f61116e1caa29879d56f23d2cb6dcf32b4d26bea32a63138
|
data/CHANGELOG.md
CHANGED
@@ -31,9 +31,11 @@ module Formalist
|
|
31
31
|
input = input.fetch(name) { [] }
|
32
32
|
errors = errors.fetch(name) { {} }
|
33
33
|
|
34
|
+
# Errors look like this when they are on the array itself: ["size cannot be greater than 2"]
|
35
|
+
# Errors look like this when they are on children: {0=>{:summary=>["must be filled"]}
|
36
|
+
|
34
37
|
children = input.each_with_index.map { |child_input, index|
|
35
|
-
|
36
|
-
child_errors = errors.fetch(index) { {} }
|
38
|
+
child_errors = errors.is_a?(Hash) ? errors.fetch(index) { {} } : {}
|
37
39
|
|
38
40
|
child_template.map { |child| child.fill(input: child_input, errors: child_errors) }
|
39
41
|
}
|
data/lib/formalist/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formalist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
requirements: []
|
232
232
|
rubyforge_project:
|
233
|
-
rubygems_version: 2.7.
|
233
|
+
rubygems_version: 2.7.6
|
234
234
|
signing_key:
|
235
235
|
specification_version: 4
|
236
236
|
summary: Flexible form builder
|