vcfb 2.0.1 → 2.0.2
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/CHANGELOG.md +4 -0
- data/lib/vcfb/component/base.rb +13 -0
- data/lib/vcfb/component/base_collection.rb +2 -0
- data/lib/vcfb/component/form.rb +2 -1
- data/lib/vcfb/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: 37ed059430db4dec9fa83fc4afede218952117e5fcbe393bec25d12b19977e96
|
4
|
+
data.tar.gz: 72786a8449548594a9abd8afa51c1bb3b28a0963cfb1299aad0d8afad766e731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d606a6d676d287b684d28220054b38b1bc84bde12237f90e42e63d4b93e4813139aa30f21c71738ac80c7094894d353a042a59428e08050c4f0ca07045208502
|
7
|
+
data.tar.gz: 80743157ca8269d9323458d21081b03043565d4cab53172aa788abd29bd6acf6d2b54ab9439b6e077fe135ff9e408340e114d4939accb9b3b654f6de4908302d
|
data/CHANGELOG.md
CHANGED
data/lib/vcfb/component/base.rb
CHANGED
@@ -22,6 +22,19 @@ module VCFB
|
|
22
22
|
def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
|
23
23
|
VCFB::Tags::CollectionRadioButtons.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
|
24
24
|
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def deobjectify_options!(options)
|
29
|
+
if instance_variable_defined?(:@form)
|
30
|
+
keys = @form.send(:objectify_options, {}).keys
|
31
|
+
options.extract!(*keys)
|
32
|
+
elsif defined?(TagOptions::Hash)
|
33
|
+
TagOptions::Hash.new
|
34
|
+
else
|
35
|
+
{}
|
36
|
+
end
|
37
|
+
end
|
25
38
|
end
|
26
39
|
end
|
27
40
|
end
|
data/lib/vcfb/component/form.rb
CHANGED
@@ -8,7 +8,6 @@ module VCFB
|
|
8
8
|
@url = url
|
9
9
|
@format = format
|
10
10
|
@options = defined?(TagOptions::Hash) ? TagOptions::Hash.new(options) : options
|
11
|
-
@form = nil
|
12
11
|
end
|
13
12
|
end
|
14
13
|
|
@@ -30,6 +29,8 @@ module VCFB
|
|
30
29
|
# Override #content and #get_slot from ViewComponent so that we can yield
|
31
30
|
# the form element (and not the component).
|
32
31
|
def content
|
32
|
+
return unless instance_variable_defined?(:@form)
|
33
|
+
|
33
34
|
if @view_context && @__vc_render_in_block
|
34
35
|
@__vc_content = view_context.capture(@form, &@__vc_render_in_block)
|
35
36
|
end
|
data/lib/vcfb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcfb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Monroe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|