From 0f081611e6746ebbf17ffc13e119b24c9ad7aa73 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 18 Jan 2019 15:54:37 -0800 Subject: Ask the view for its method container Rather than doing is_a? checks, ask the view object for its compiled method container. This gives us the power to replace the method container depending on the instance of the view. --- actionview/lib/action_view/template.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'actionview/lib/action_view/template.rb') diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index e86a49f222..8ce8053011 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -264,11 +264,7 @@ module ActionView # re-compilation return if @compiled - if view.is_a?(ActionView::CompiledTemplates) - mod = ActionView::CompiledTemplates - else - mod = view.singleton_class - end + mod = view.compiled_method_container instrument("!compile_template") do compile(mod) -- cgit v1.2.3