aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/file_template.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/file_template.rb')
-rw-r--r--actionview/lib/action_view/file_template.rb25
1 files changed, 2 insertions, 23 deletions
diff --git a/actionview/lib/action_view/file_template.rb b/actionview/lib/action_view/file_template.rb
index dea02176eb..f952c364c9 100644
--- a/actionview/lib/action_view/file_template.rb
+++ b/actionview/lib/action_view/file_template.rb
@@ -5,29 +5,8 @@ require "action_view/template"
module ActionView
class FileTemplate < Template
def initialize(filename, handler, details)
- @filename = filename
-
- super(nil, filename, handler, details)
- end
-
- def source
- File.binread @filename
- end
-
- def refresh(_)
- self
- end
-
- # Exceptions are marshalled when using the parallel test runner with DRb, so we need
- # to ensure that references to the template object can be marshalled as well. This means forgoing
- # the marshalling of the compiler mutex and instantiating that again on unmarshalling.
- def marshal_dump # :nodoc:
- [ @identifier, @handler, @compiled, @locals, @virtual_path, @updated_at, @format, @variant ]
- end
-
- def marshal_load(array) # :nodoc:
- @identifier, @handler, @compiled, @locals, @virtual_path, @updated_at, @format, @variant = *array
- @compile_mutex = Mutex.new
+ source = ActionView::Template::Sources::File.new(filename)
+ super(source, filename, handler, details)
end
end
end