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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbb45046003eb60f818dab6f8f6840fd2db12448638b6e0bbf037febe7eb1181
4
- data.tar.gz: 848611876927e81bb4a7d6aa83e56e4748c65b400e8883a34b97abfc8b994a9c
3
+ metadata.gz: 37ed059430db4dec9fa83fc4afede218952117e5fcbe393bec25d12b19977e96
4
+ data.tar.gz: 72786a8449548594a9abd8afa51c1bb3b28a0963cfb1299aad0d8afad766e731
5
5
  SHA512:
6
- metadata.gz: 67b3d105c6dd5f46531bd9662fb0d90b1a7ccaca8d861cb617d1fbb8999eb9a4772a9aa113fa6f1bf6733f6697e1a468247cbab55a113f5de14914e6cc5be079
7
- data.tar.gz: c38374b0aa001bbfb897b0587eded3bd085b33f404ca415775f206ef37bd8b0fdc33367bad3c8851754d34bce28f6593a524a13b0a37503237ec58f5c0d2f138
6
+ metadata.gz: d606a6d676d287b684d28220054b38b1bc84bde12237f90e42e63d4b93e4813139aa30f21c71738ac80c7094894d353a042a59428e08050c4f0ca07045208502
7
+ data.tar.gz: 80743157ca8269d9323458d21081b03043565d4cab53172aa788abd29bd6acf6d2b54ab9439b6e077fe135ff9e408340e114d4939accb9b3b654f6de4908302d
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  -
6
6
 
7
+ ## 2.0.2
8
+
9
+ - Support for ViewComponent 2.61.0
10
+
7
11
  ## 2.0.1
8
12
 
9
13
  - Restore usage of tag options gem if present.
@@ -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
@@ -4,6 +4,8 @@ module VCFB
4
4
  private
5
5
 
6
6
  def content
7
+ return unless instance_variable_defined?(:@builder)
8
+
7
9
  @__vc_content = if @view_context && @__vc_render_in_block
8
10
  view_context.capture(@builder, &@__vc_render_in_block)
9
11
  else
@@ -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
@@ -1,3 +1,3 @@
1
1
  module VCFB
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
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.1
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-05 00:00:00.000000000 Z
11
+ date: 2022-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails