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