Exception: ViewComponent::UndefinedCacheKeyMethodError
- Inherits:
-
StandardError
- Object
- StandardError
- ViewComponent::UndefinedCacheKeyMethodError
- Defined in:
- lib/view_component/errors.rb
Constant Summary collapse
- MESSAGE =
"`cache_on` declared `METHOD` on COMPONENT, but no such method is defined.\n\n" \ "To fix this issue, define `METHOD` or remove it from `cache_on`.".freeze
Instance Method Summary collapse
-
#initialize(component_name, method_name) ⇒ UndefinedCacheKeyMethodError
constructor
A new instance of UndefinedCacheKeyMethodError.
Constructor Details
#initialize(component_name, method_name) ⇒ UndefinedCacheKeyMethodError
Returns a new instance of UndefinedCacheKeyMethodError.
253 254 255 |
# File 'lib/view_component/errors.rb', line 253 def initialize(component_name, method_name) super(MESSAGE.gsub("COMPONENT", component_name.to_s).gsub("METHOD", method_name.to_s)) end |