diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-02-21 14:55:34 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-02-21 14:55:52 -0200 |
commit | 4eff6bc6dfeea3eed5d92af66bd73e6a2cb9b09f (patch) | |
tree | 7d9c4558f8865eeeedf6ee070e59ba9ce6c1b54c /actionpack/lib/action_view | |
parent | b1229685c4329252cbdc44ac10d43fb633d01adb (diff) | |
download | rails-4eff6bc6dfeea3eed5d92af66bd73e6a2cb9b09f.tar.gz rails-4eff6bc6dfeea3eed5d92af66bd73e6a2cb9b09f.tar.bz2 rails-4eff6bc6dfeea3eed5d92af66bd73e6a2cb9b09f.zip |
Restore lookup formats to the previous value after searching for the failing view
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index af6e5d0645..3a944cf1ab 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -164,10 +164,12 @@ module ActionView pieces = @virtual_path.split("/") name = pieces.pop partial = !!name.sub!(/^_/, "") - lookup.formats = @formats + previous_formats, lookup.formats = lookup.formats, @formats lookup.disable_cache do lookup.find_template(name, [ pieces.join('/') ], partial, @locals) end + ensure + lookup.formats = previous_formats end def inspect |