view_component 2.23.0 → 2.23.1

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.

Potentially problematic release.


This version of view_component might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fcba3738e1cef136c14cd82cc3dd8301596f576b8891bd668e5216ff0dca9bc6
4
- data.tar.gz: 7bd2112814c640f4b524f557799d1484fcaf88240505e7e09753cdacf7af87bd
3
+ metadata.gz: b2282359cc779d83fa6aa65b912fe4e4e70d2dbd6c8939b2bd0f3e21bd2eb9e7
4
+ data.tar.gz: c97fffc33ed1ffb6cd4598136c30c1b5990f1f150e8a7fc04ecfae933ae6c271
5
5
  SHA512:
6
- metadata.gz: e97c8b9fe11d78da84c129f99bfa19c8e76596064d76adc78f28127410f7f5b31a856c31a4a1e8444c707d7d228b1ffe4c01d9b70ffcc54a3ef9bd7edba7a61b
7
- data.tar.gz: 6856e490404554040459f57bfab1ae523a00808498230078bc914f97f1bcaf19d1f4a50c5ba66c5d31b0250d2d3185df0f4a93b6761bd875349e0b3a7f643466
6
+ metadata.gz: ec8397db82e97af474d4d25c8fde9346c73de00fdc37cd108640983a3230c08eae4c95566e8c86a96ad78c7e0c04aabf028f3f9c3e3040111d2b84d43c92bd53
7
+ data.tar.gz: 152e91807eff69a99066d20d977ec9092c71f44754fa2f2fd76cd69be4f221e47cdfd01c413aaac60f7334c4d852f86a2a8514f395c8ed773407203c82d77fe0
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 2.23.1
6
+
7
+ * Fixed out-of-order rendering bug in `ActionView::SlotableV2`
8
+
9
+ *Blake Williams*
10
+
5
11
  ## 2.23.0
6
12
 
7
13
  * Add `ActionView::SlotableV2`
@@ -22,16 +22,16 @@ module ViewComponent
22
22
  # If there is no slot renderable, we evaluate the block passed to
23
23
  # the slot and return it.
24
24
  def to_s
25
- if defined?(@_component_instance)
26
- # render_in is faster than `parent.render`
27
- @_component_instance.render_in(
28
- @parent.send(:view_context),
29
- &@_content_block
30
- )
31
- elsif defined?(@_content)
32
- @_content
33
- elsif defined?(@_content_block)
34
- @_content_block.call
25
+ view_context = @parent.send(:view_context)
26
+ view_context.capture do
27
+ if defined?(@_component_instance)
28
+ # render_in is faster than `parent.render`
29
+ @_component_instance.render_in(view_context, &@_content_block)
30
+ elsif defined?(@_content)
31
+ @_content
32
+ elsif defined?(@_content_block)
33
+ @_content_block.call
34
+ end
35
35
  end
36
36
  end
37
37
 
@@ -59,7 +59,7 @@ module ViewComponent
59
59
  end
60
60
 
61
61
  def respond_to_missing?(symbol, include_all = false)
62
- @_component_instance.respond_to?(symbol, include_all)
62
+ defined?(@_component_instance) && @_component_instance.respond_to?(symbol, include_all)
63
63
  end
64
64
  end
65
65
  end
@@ -4,7 +4,7 @@ module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
6
  MINOR = 23
7
- PATCH = 0
7
+ PATCH = 1
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.0
4
+ version: 2.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-09 00:00:00.000000000 Z
11
+ date: 2020-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport