Module: TypedViewModel::JobHelpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/typed_view_model/job_helpers.rb,
lib/typed_view_model/job_helpers/active_storage_urls.rb
Overview
Job-side wiring. Mirrors ‘ControllerHelpers`: wraps each `perform` in `with_current_helpers(view_context) { yield }` so any view model rendered inside the job can call `helpers` and resolve URL/format/i18n helpers without a request.
class ApplicationJob < ActiveJob::Base
include TypedViewModel::JobHelpers
end
The view-context shim is a minimal class that mixes in ‘Rails.application.routes.url_helpers` and stubs `url_for` to `“#”`. Override `build_view_context_class` to compose extra behaviour; call `super` and wrap the returned class.
Defined Under Namespace
Modules: ActiveStorageUrls