diff options
-rw-r--r-- | actionview/lib/action_view.rb | 1 | ||||
-rw-r--r-- | actionview/lib/action_view/file_template.rb | 12 | ||||
-rw-r--r-- | actionview/lib/action_view/template/resolver.rb | 4 |
3 files changed, 3 insertions, 14 deletions
diff --git a/actionview/lib/action_view.rb b/actionview/lib/action_view.rb index f398ba0ff0..5ee14bfc78 100644 --- a/actionview/lib/action_view.rb +++ b/actionview/lib/action_view.rb @@ -44,7 +44,6 @@ module ActionView autoload :Rendering autoload :RoutingUrlFor autoload :Template - autoload :FileTemplate autoload :ViewPaths autoload_under "renderer" do diff --git a/actionview/lib/action_view/file_template.rb b/actionview/lib/action_view/file_template.rb deleted file mode 100644 index f952c364c9..0000000000 --- a/actionview/lib/action_view/file_template.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -require "action_view/template" - -module ActionView - class FileTemplate < Template - def initialize(filename, handler, details) - source = ActionView::Template::Sources::File.new(filename) - super(source, filename, handler, details) - end - end -end diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index d5cb3c823a..e291dc268a 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -191,7 +191,9 @@ module ActionView def build_template(template, virtual_path, locals) handler, format, variant = extract_handler_and_format_and_variant(template) - FileTemplate.new(File.expand_path(template), handler, + filename = File.expand_path(template) + source = Template::Sources::File.new(filename) + Template.new(source, filename, handler, virtual_path: virtual_path, format: format, variant: variant, |