Skip to content

Commit 6fa2a91

Browse files
authored
Re-add @private, undocumented .identifier method that was only me… (#2109)
* Re-add `@private`, undocumented `.identifier` method that was only meant for internal framework use but was used by some downstream consumers. This method will be removed in a coming minor release. * add nocov marks
1 parent 0dc9342 commit 6fa2a91

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ nav_order: 5
1010

1111
## main
1212

13+
* Re-add `@private`, undocumented `.identifier` method that was only meant for internal framework use but was used by some downstream consumers. This method will be removed in a coming minor release.
14+
15+
*Joel Hawksley*
16+
1317
## 3.15.0
1418

1519
* Add basic internal testing for memory allocations.

lib/view_component/base.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,15 @@ def compiler
574574
@__vc_compiler ||= Compiler.new(self)
575575
end
576576

577+
# @private
578+
def identifier
579+
# :nocov:
580+
Kernel.warn("WARNING: The #{self.class}.identifier is undocumented and was meant for internal framework usage only. As it is no longer used by the framework it will be removed in a coming non-breaking ViewComponent release.")
581+
582+
source_location
583+
# :nocov:
584+
end
585+
577586
# Set the parameter name used when rendering elements of a collection ([documentation](/guide/collections)):
578587
#
579588
# ```ruby

0 commit comments

Comments
 (0)