diff options
Diffstat (limited to 'actionpack/lib/action_view/template.rb')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 3cc9bb2710..074daa5d28 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -155,11 +155,12 @@ module ActionView # virtual path set (true just for inline templates). def refresh(view) raise "A template need to have a virtual path in order to be refreshed" unless @virtual_path + lookup = view.lookup_context pieces = @virtual_path.split("/") name = pieces.pop partial = name.sub!(/^_/, "") - view.lookup_context.disable_cache do - view.find_template(name, pieces.join, partial || false, @locals) + lookup.disable_cache do + lookup.find_template(name, pieces.join, partial || false, @locals) end end |