discourse/app/services/user_notification_renderer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
426 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class UserNotificationRenderer < ActionView::Base
include ApplicationHelper
include UserNotificationsHelper
include EmailHelper
LOCK = Mutex.new
def self.render(*args)
LOCK.synchronize do
@instance ||= UserNotificationRenderer.with_empty_template_cache.with_view_paths(
Rails.configuration.paths["app/views"]
)
@instance.render(*args)
end
end
end