mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 10:50:23 +08:00
45ccadeeeb
Rails 6.1.3.1 deprecates a few API and has some internal changes that break our tests suite, so this commit fixes all the deprecations and errors and now Discourse should be fully compatible with Rails 6.1.3.1. We also have a new release of the rails_failover gem that's compatible with Rails 6.1.3.1.
19 lines
426 B
Ruby
19 lines
426 B
Ruby
# 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
|