From 4c97405383eae5394d3ce706c599b10814ab5436 Mon Sep 17 00:00:00 2001 From: Reegan Viljoen Date: Tue, 5 Nov 2024 10:53:10 +0200 Subject: [PATCH] fix lint --- lib/view_component/base.rb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/view_component/base.rb b/lib/view_component/base.rb index 0ed1ba9f4..f3905bb2e 100644 --- a/lib/view_component/base.rb +++ b/lib/view_component/base.rb @@ -263,14 +263,6 @@ def virtual_path self.class.virtual_path end - # For caching, such as #cache_if - # @private - def view_cache_dependencies - self.class.view_cache_dependencies - end - - alias_method :component_cache_dependencies, :view_cache_dependencies - # For caching, such as #cache_if # # @private @@ -293,6 +285,9 @@ def __vc_request @__vc_request ||= controller.request if controller.respond_to?(:request) end + # For caching, such as #cache_if + # + # @private def view_cache_dependencies return unless __vc_cache_dependencies.present? && __vc_cache_dependencies.any? @@ -477,8 +472,6 @@ class << self # @private attr_accessor :virtual_path - - # Find sidecar files for the given extensions. # # The provided array of extensions is expected to contain @@ -590,7 +583,7 @@ def render_template_for(variant = nil, format = nil) child.instance_variable_set(:@__vc_ancestor_calls, vc_ancestor_calls) end - child.__vc_cache_dependencies = self.__vc_cache_dependencies.dup + child.__vc_cache_dependencies = __vc_cache_dependencies.dup super end