2a1817d902
so that, for example, notification content contains the URLs properly scoped to the account.
18 lines
442 B
Ruby
18 lines
442 B
Ruby
module TurboStreamsJobExtensions
|
|
extend ActiveSupport::Concern
|
|
|
|
class_methods do
|
|
def render_format(format, **rendering)
|
|
if Current.account.present?
|
|
ApplicationController.renderer.new(script_name: Current.account.slug).render(formats: [ format ], **rendering)
|
|
else
|
|
super
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
Rails.application.config.after_initialize do
|
|
Turbo::StreamsChannel.prepend TurboStreamsJobExtensions
|
|
end
|