Exception: ViewComponent::CacheDigestTemplateError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/view_component/errors.rb

Constant Summary collapse

MESSAGE =
"The synthetic cache digest template for COMPONENT was rendered.\n\n" \
"This template exists only so Rails can compute a cache digest for the " \
"component and is never meant to be rendered. Render the component " \
"itself instead.".freeze

Instance Method Summary collapse

Constructor Details

#initialize(component_name) ⇒ CacheDigestTemplateError

Returns a new instance of CacheDigestTemplateError.



243
244
245
# File 'lib/view_component/errors.rb', line 243

def initialize(component_name)
  super(MESSAGE.gsub("COMPONENT", component_name.to_s))
end