Exception: ViewComponent::TranslateCalledBeforeRenderError
- Inherits:
-
BaseError
- Object
- StandardError
- BaseError
- ViewComponent::TranslateCalledBeforeRenderError
- Defined in:
- lib/view_component/errors.rb
Constant Summary collapse
- MESSAGE =
"`#translate` can't be used during initialization as it depends " \ "on the view context that only exists once a ViewComponent is passed to " \ "the Rails render pipeline.\n\n" \ "It's sometimes possible to fix this issue by moving code dependent on " \ "`#translate` to a [`#before_render` method](https://viewcomponent.org/api.html#before_render--void)."
Method Summary
Methods inherited from BaseError
Constructor Details
This class inherits a constructor from ViewComponent::BaseError