diff options
-rw-r--r-- | actionview/lib/action_view/base.rb | 4 | ||||
-rw-r--r-- | actionview/lib/action_view/template.rb | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 384439c8fb..6cb342a0a9 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -224,6 +224,10 @@ module ActionView #:nodoc: @output_buffer, @virtual_path = _old_output_buffer, _old_virtual_path end + def compiled_method_container + CompiledTemplates + end + ActiveSupport.run_load_hooks(:action_view, self) end end 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) |