Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
reeganviljoen committed Nov 5, 2024
1 parent 4c97405 commit 1704d7e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions lib/view_component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,15 @@ def virtual_path
self.class.virtual_path
end

# For caching, such as #cache_if
#
# @private
def view_cache_dependencies
return unless __vc_cache_dependencies.present? && __vc_cache_dependencies.any?

__vc_cache_dependencies.map { |dep| send(dep) }.compact
end

# For caching, such as #cache_if
#
# @private
Expand All @@ -285,15 +294,6 @@ 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?

__vc_cache_dependencies.map { |dep| send(dep) }.compact
end

# The content passed to the component instance as a block.
#
# @return [String]
Expand Down Expand Up @@ -457,8 +457,6 @@ def safe_output_postamble
# config.view_component.generate.preview = true
# ```
#
# Defaults to `false`
#

class << self
# The file path of the component Ruby file.
Expand Down

0 comments on commit 1704d7e

Please sign in to comment.