diff options
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/template.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index 18a5dae270..2dfb14ab46 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -235,6 +235,15 @@ module ActionView end end + def marshal_dump + [ @source, @identifier, @handler, @compiled, @original_encoding, @locals, @virtual_path, @updated_at, @formats, @variants ] + end + + def marshal_load(array) + @source, @identifier, @handler, @compiled, @original_encoding, @locals, @virtual_path, @updated_at, @formats, @variants = *array + @compile_mutex = Mutex.new + end + private # Compile a template. This method ensures a template is compiled |