view_component 3.12.0 → 3.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/CHANGELOG.md +6 -0
- data/lib/view_component/slot.rb +11 -1
- data/lib/view_component/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: 875f47469a83b3b70de2e4271cc4af72542d88c6e12c373c8f6912d3c8c6d13e
|
4
|
+
data.tar.gz: 161671b627c087f227706c10e6ca7f900dcdd3d2ea49232024543bf78a3be14b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaa215e2aba616eca2ea0e1bd1e4ab76df2f6f4f34d1f3f225a5802a943b8e6c8e920b3821fda06353e52979345a8d941c2d3d2eaa24b71a6928502846224acc
|
7
|
+
data.tar.gz: f7da13dfa835866ac685d567f41549857ca40682e6f2beee269bf07b4b9bfaf942af62d03dbcc019cb72ef349ed8c601be24c1598efd0cb38e26397decb4e09a
|
data/docs/CHANGELOG.md
CHANGED
data/lib/view_component/slot.rb
CHANGED
@@ -57,7 +57,17 @@ module ViewComponent
|
|
57
57
|
|
58
58
|
if defined?(@__vc_content_block)
|
59
59
|
# render_in is faster than `parent.render`
|
60
|
-
@__vc_component_instance.render_in(view_context
|
60
|
+
@__vc_component_instance.render_in(view_context) do |*args|
|
61
|
+
return @__vc_content_block.call(*args) if @__vc_content_block&.source_location.nil?
|
62
|
+
|
63
|
+
block_context = @__vc_content_block.binding.receiver
|
64
|
+
|
65
|
+
if block_context.class < ActionView::Base
|
66
|
+
block_context.capture(*args, &@__vc_content_block)
|
67
|
+
else
|
68
|
+
@__vc_content_block.call(*args)
|
69
|
+
end
|
70
|
+
end
|
61
71
|
else
|
62
72
|
@__vc_component_instance.render_in(view_context)
|
63
73
|
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: 3.12.
|
4
|
+
version: 3.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ViewComponent Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|