mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reset ActionText::Content.renderer before and after each request
This commit is contained in:
parent
f99b3c5f97
commit
02d2958b6c
1 changed files with 6 additions and 3 deletions
|
@ -34,13 +34,16 @@ module ActionText
|
|||
end
|
||||
end
|
||||
|
||||
initializer "action_text.renderer" do
|
||||
initializer "action_text.renderer" do |app|
|
||||
app.executor.to_run { ActionText::Content.renderer = ApplicationController.renderer }
|
||||
app.executor.to_complete { ActionText::Content.renderer = ApplicationController.renderer }
|
||||
|
||||
ActiveSupport.on_load(:action_text_content) do
|
||||
self.renderer ||= ApplicationController.renderer
|
||||
self.renderer = ApplicationController.renderer
|
||||
end
|
||||
|
||||
ActiveSupport.on_load(:action_controller_base) do
|
||||
before_action { ActionText::Content.renderer = ActionText::Content.renderer.new(request.env) }
|
||||
before_action { ActionText::Content.renderer = ApplicationController.renderer.new(request.env) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue