2019-07-30 15:05:08 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class UserNotificationRenderer < ActionView::Base
|
|
|
|
include ApplicationHelper
|
|
|
|
include UserNotificationsHelper
|
|
|
|
include EmailHelper
|
2019-10-06 23:57:03 -04:00
|
|
|
|
2019-10-10 08:50:48 +11:00
|
|
|
LOCK = Mutex.new
|
|
|
|
|
|
|
|
def self.render(*args)
|
|
|
|
LOCK.synchronize do
|
2023-01-09 12:20:10 +00:00
|
|
|
@instance ||=
|
|
|
|
UserNotificationRenderer.with_empty_template_cache.with_view_paths(
|
|
|
|
Rails.configuration.paths["app/views"],
|
|
|
|
)
|
2019-10-10 08:50:48 +11:00
|
|
|
@instance.render(*args)
|
|
|
|
end
|
2019-10-06 23:57:03 -04:00
|
|
|
end
|
2019-07-30 15:05:08 -04:00
|
|
|
end
|