aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2019-01-23 14:19:50 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2019-02-06 16:52:15 -0800
commitf9bea6304dfba902b1937b3bc29b1ebc2f67e55b (patch)
tree4859079e3b5c7055fb3b0b8b21bea08cd60de3f6 /actionpack
parent9483cdee0a3ed9c686e338f079b0e369597b1211 (diff)
downloadrails-f9bea6304dfba902b1937b3bc29b1ebc2f67e55b.tar.gz
rails-f9bea6304dfba902b1937b3bc29b1ebc2f67e55b.tar.bz2
rails-f9bea6304dfba902b1937b3bc29b1ebc2f67e55b.zip
Move templates to an anonymous subclass of AV::Base
Now we can throw away the subclass and the generated methods will get GC'd too
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_view.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_view.rb b/actionpack/lib/action_dispatch/middleware/debug_view.rb
index 5a7010a1c2..499bb1b391 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_view.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_view.rb
@@ -9,12 +9,21 @@ module ActionDispatch
class DebugView < ActionView::Base # :nodoc:
RESCUES_TEMPLATE_PATH = File.expand_path("templates", __dir__)
+ module CompiledTemplates
+ end
+
+ include CompiledTemplates
+
def initialize(assigns)
paths = [RESCUES_TEMPLATE_PATH]
renderer = ActionView::Renderer.new ActionView::LookupContext.new(paths)
super(renderer, assigns)
end
+ def compiled_method_container
+ CompiledTemplates
+ end
+
def debug_params(params)
clean_params = params.clone
clean_params.delete("action")