Skip to content

Commit a5cca65

Browse files
committed
fix
1 parent df125a7 commit a5cca65

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

lib/view_component/base.rb

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,15 @@ def virtual_path
263263
self.class.virtual_path
264264
end
265265

266+
# For caching, such as #cache_if
267+
#
268+
# @private
269+
def view_cache_dependencies
270+
return unless __vc_cache_dependencies.present? && __vc_cache_dependencies.any?
271+
272+
__vc_cache_dependencies.map { |dep| send(dep) }.compact
273+
end
274+
266275
# For caching, such as #cache_if
267276
#
268277
# @private
@@ -285,15 +294,6 @@ def __vc_request
285294
@__vc_request ||= controller.request if controller.respond_to?(:request)
286295
end
287296

288-
# For caching, such as #cache_if
289-
#
290-
# @private
291-
def view_cache_dependencies
292-
return unless __vc_cache_dependencies.present? && __vc_cache_dependencies.any?
293-
294-
__vc_cache_dependencies.map { |dep| send(dep) }.compact
295-
end
296-
297297
# The content passed to the component instance as a block.
298298
#
299299
# @return [String]
@@ -457,8 +457,6 @@ def safe_output_postamble
457457
# config.view_component.generate.preview = true
458458
# ```
459459
#
460-
# Defaults to `false`
461-
#
462460

463461
class << self
464462
# The file path of the component Ruby file.

0 commit comments

Comments
 (0)