view_component 2.23.0 → 2.23.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of view_component might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/view_component/slot_v2.rb +11 -11
- 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: b2282359cc779d83fa6aa65b912fe4e4e70d2dbd6c8939b2bd0f3e21bd2eb9e7
|
4
|
+
data.tar.gz: c97fffc33ed1ffb6cd4598136c30c1b5990f1f150e8a7fc04ecfae933ae6c271
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec8397db82e97af474d4d25c8fde9346c73de00fdc37cd108640983a3230c08eae4c95566e8c86a96ad78c7e0c04aabf028f3f9c3e3040111d2b84d43c92bd53
|
7
|
+
data.tar.gz: 152e91807eff69a99066d20d977ec9092c71f44754fa2f2fd76cd69be4f221e47cdfd01c413aaac60f7334c4d852f86a2a8514f395c8ed773407203c82d77fe0
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
26
|
-
|
27
|
-
@_component_instance
|
28
|
-
|
29
|
-
&@_content_block
|
30
|
-
)
|
31
|
-
|
32
|
-
@
|
33
|
-
|
34
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2020-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|