template_form 0.4.12 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/template_form/form_builder.rb +4 -7
- data/lib/template_form/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: 0b6cc4d9623f0173a4237d5ed8dde6cd97eae075ee9f32515f7b918ffc3d3519
|
|
4
|
+
data.tar.gz: a19f342f83d2618455a13768096da610d1938ecdfafdb4c6ff17eba3343d932e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f276ed7c3c9dfba1922f3d61b76b31f7aad2480802c182abaad480cb82678b45640c4337aa8484340a66ba49939d46cee358276d23131a1565d5f652e0343ad
|
|
7
|
+
data.tar.gz: 8eb61ff35c92ecca35d05b69690765b7e1da03a2200f5227d5b8d029e6278a3d1941bfa46efe9c9be205c175ae3ebf0d566549549491e02b633494b7510f6617
|
|
@@ -16,14 +16,11 @@ module TemplateForm
|
|
|
16
16
|
|
|
17
17
|
attr_reader :form_type
|
|
18
18
|
|
|
19
|
-
def initialize(
|
|
19
|
+
def initialize(...)
|
|
20
20
|
super
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# correct form type.
|
|
25
|
-
@form_type = options[:form_type] || TemplateForm.form_type
|
|
26
|
-
@view = options[:view]
|
|
21
|
+
parent_options = options[:parent_builder]&.options
|
|
22
|
+
@form_type = options[:form_type] || parent_options&.dig(:form_type) || TemplateForm.form_type
|
|
23
|
+
@view = options[:view] || parent_options&.dig(:view)
|
|
27
24
|
end
|
|
28
25
|
|
|
29
26
|
def input(attribute_name, options = {})
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: template_form
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Stewart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack
|