To render outside of the usual request cycle or view context, e.g. in a model or a background job:
To render a ViewComponent
(renders the component including layout):
To render a ViewComponent
without a layout (useful when using TurboStream):
To render with request parameters, useful when the controller defines default_url_options
which are not available outside the request cycle: