view_component 4.0.0.alpha1 → 4.0.0.alpha2
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 +4 -4
- data/docs/CHANGELOG.md +7 -1
- data/lib/view_component/base.rb +1 -0
- data/lib/view_component/template.rb +1 -1
- data/lib/view_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: 35393079b843dba053e2e4acca6429b8181a5c255c5843c7ad39fcb5245b8762
|
4
|
+
data.tar.gz: a9a602a05dd03d1865bfef3115904f8f7afec7bccbddc2497469638982259875
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04e1d26d5f24f76c75cf4b105842b71ce31887ec8ec939e6c9a232f1c0bca48fe61bdad32e602773aa95f19c338a2d2fc4962a381fc025bf3ea356d1343cbf80
|
7
|
+
data.tar.gz: b2c254c725e460a0dc16cd90300218ffff424c889946b7df9e31561b93d89dba304510e07afd48d014fdf1f576d07aa9e59ac75e2dce0822fb45fac7b7f9fdf1
|
data/docs/CHANGELOG.md
CHANGED
@@ -10,7 +10,13 @@ nav_order: 6
|
|
10
10
|
|
11
11
|
## main
|
12
12
|
|
13
|
-
## 4.0.0
|
13
|
+
## 4.0.0.alpha2
|
14
|
+
|
15
|
+
* Add `#current_template` accessor and `Template#path` for diagnostic usage.
|
16
|
+
|
17
|
+
*Joel Hawksley*
|
18
|
+
|
19
|
+
## 4.0.0.alpha1
|
14
20
|
|
15
21
|
Almost six years after releasing [v1.0.0](https://github.com/ViewComponent/view_component/releases/tag/v1.0.0), we're proud to ship ViewComponent 4. This release marks a shift towards a Long Term Support model for the project, having reached significant feature maturity. While contributions are always welcome, we're unlikely to accept further breaking changes or major feature additions.
|
16
22
|
|
data/lib/view_component/base.rb
CHANGED
@@ -50,6 +50,7 @@ module ViewComponent
|
|
50
50
|
class_attribute :__vc_strip_trailing_whitespace, instance_accessor: false, instance_predicate: false, default: false
|
51
51
|
|
52
52
|
attr_accessor :__vc_original_view_context
|
53
|
+
attr_reader :current_template
|
53
54
|
|
54
55
|
# Components render in their own view context. Helpers and other functionality
|
55
56
|
# require a reference to the original Rails view context, an instance of
|
@@ -7,7 +7,7 @@ module ViewComponent
|
|
7
7
|
|
8
8
|
DataWithSource = Struct.new(:format, :identifier, :short_identifier, :type, keyword_init: true)
|
9
9
|
|
10
|
-
attr_reader :details
|
10
|
+
attr_reader :details, :path
|
11
11
|
|
12
12
|
delegate :virtual_path, to: :@component
|
13
13
|
delegate :format, :variant, to: :@details
|