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-09 17:50:48 -04:00
|
|
|
LOCK = Mutex.new
|
|
|
|
|
|
|
|
def self.render(*args)
|
|
|
|
LOCK.synchronize do
|
|
|
|
@instance ||= UserNotificationRenderer.with_view_paths(
|
|
|
|
Rails.configuration.paths["app/views"]
|
|
|
|
)
|
|
|
|
@instance.render(*args)
|
|
|
|
end
|
2019-10-06 23:57:03 -04:00
|
|
|
end
|
2019-10-09 17:50:48 -04:00
|
|
|
|
2019-07-30 15:05:08 -04:00
|
|
|
end
|