Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
reeganviljoen committed Nov 5, 2024
1 parent 79bd6be commit 4c97405
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lib/view_component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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?

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4c97405

Please sign in to comment.