formalist 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/formalist/definition.rb +2 -2
- data/lib/formalist/element.rb +1 -1
- data/lib/formalist/elements/field.rb +0 -3
- data/lib/formalist/form.rb +6 -6
- data/lib/formalist/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18e68963bc4183a119d9148105260e0db4013e05930135ba163aff7323bb56f1
|
4
|
+
data.tar.gz: 52981229e22c0bd7cf7bddd6f5aae1dfef9a3adf0e2ada0630184355fea74cd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41944e8fed2c09fb7487ee42dfeaccfb77e48a63dbe8e1449da323acc7a872f531666cf1e26fbae8e8e9bc0400f5739d4cb70c2a3b76b381a580e3cceae22115
|
7
|
+
data.tar.gz: daa02bdd21dbbf6d3a185dbc571e19ff1b27439087bd8b5f45b721912e463874f40df8a7ef951e55e74dcd0caa972b329e362033a9b4bae6472688ada92f13b9
|
data/CHANGELOG.md
CHANGED
data/lib/formalist/definition.rb
CHANGED
@@ -25,7 +25,7 @@ module Formalist
|
|
25
25
|
def method_missing(name, *args, &block)
|
26
26
|
if element_type?(name)
|
27
27
|
add_element(name, *args, &block)
|
28
|
-
elsif form.respond_to?(name)
|
28
|
+
elsif form.respond_to?(name, include_private = true)
|
29
29
|
form.send(name, *args, &block)
|
30
30
|
else
|
31
31
|
super
|
@@ -35,7 +35,7 @@ module Formalist
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def respond_to_missing?(name, _include_private = false)
|
38
|
-
element_type?(name) || form.respond_to?(name)
|
38
|
+
element_type?(name) || form.respond_to?(name, _include_private = true) || super
|
39
39
|
end
|
40
40
|
|
41
41
|
def element_type?(type)
|
data/lib/formalist/element.rb
CHANGED
data/lib/formalist/form.rb
CHANGED
@@ -28,17 +28,17 @@ module Formalist
|
|
28
28
|
@errors = errors
|
29
29
|
|
30
30
|
@elements =
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
if elements == Undefined
|
32
|
+
Definition.new(self, self.class.config, &self.class.definition).elements
|
33
|
+
else
|
34
|
+
elements
|
35
|
+
end
|
36
36
|
|
37
37
|
@dependencies = dependencies
|
38
38
|
end
|
39
39
|
|
40
40
|
def fill(input: {}, errors: {})
|
41
|
-
return self if input == @input && errors
|
41
|
+
return self if input == @input && errors == @errors
|
42
42
|
|
43
43
|
self.class.new(
|
44
44
|
elements: @elements.map { |element| element.fill(input: input, errors: errors) },
|
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.4.
|
4
|
+
version: 0.4.2
|
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-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|