spark-component 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/Gemfile.lock +1 -1
- data/lib/spark/component/element.rb +4 -3
- data/lib/spark/component/integration/action_view_component.rb +5 -1
- data/lib/spark/component/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9464f05e5121dce8c628531abf34817e72c3cb83628a4c8b60f82d99292078d1
|
4
|
+
data.tar.gz: 6380a3ebc543c2d6a1e504d79f982b76a1e83205dd9af3bf8222caa683f7ee9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1bc76fb688cba102924ef87659a2615d1c8ce8eab2e9a482d4d6b15dfd582c2787f2969d68a5899d68b4524869d19d32350764412f0bd5bbc7747aed76b4d68
|
7
|
+
data.tar.gz: 2fbbecb520838250bfce8fac365d71f81e02464e093bcac19bc4b059b7cdae0c82dc20c4e1357bba66246bf64d0af6e56ed5e6daa12bbc43bbcad6993ec208d3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
# v1.1.
|
1
|
+
# v1.1.2 - 2020-01-14
|
2
|
+
- Fix: Added render checking to component to prevent executing `render_self` more than once.
|
2
3
|
|
4
|
+
# v1.1.1 - 2020-01-14
|
3
5
|
- Fix: When a nested element is referenced it will trigger the parent to yield
|
4
6
|
its block, ensuring that the nested element reference will be instantiated
|
5
7
|
if it is used in the parent's block.
|
data/Gemfile.lock
CHANGED
@@ -38,12 +38,13 @@ module Spark
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def render_self
|
41
|
-
|
41
|
+
# Guard with `rendered?` boolean in case render_block returns `nil`
|
42
|
+
return @render_self if rendered?
|
42
43
|
|
43
|
-
@
|
44
|
+
@render_self = render_block(@view_context, &_block)
|
44
45
|
validate! if defined?(ActiveModel::Validations)
|
45
46
|
@rendered = true
|
46
|
-
@
|
47
|
+
@render_self
|
47
48
|
end
|
48
49
|
|
49
50
|
def rendered?
|
@@ -34,7 +34,11 @@ module Spark
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def render_self
|
37
|
-
|
37
|
+
# Guard with `rendered?` boolean in case render_block returns `nil`
|
38
|
+
return @render_self if rendered?
|
39
|
+
|
40
|
+
@rendered = true
|
41
|
+
@render_self = render_in(@view_context, &@_block)
|
38
42
|
end
|
39
43
|
|
40
44
|
# Override class methods for components
|