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:34 -0200 |
commit | 92a7296a5deb109d054b32d96fa1a74f0859a81b (patch) | |
tree | e85eee6e887e5d324bad8977e59bf5ca1671975a /actionpack/lib | |
parent | 67a5157974ed9809570e2b29b69b59b85a4c7c52 (diff) | |
download | rails-92a7296a5deb109d054b32d96fa1a74f0859a81b.tar.gz rails-92a7296a5deb109d054b32d96fa1a74f0859a81b.tar.bz2 rails-92a7296a5deb109d054b32d96fa1a74f0859a81b.zip |
Restore lookup formats to the previous value after searching for the failing view
Diffstat (limited to 'actionpack/lib')
-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 644debd49c..630625fb90 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -163,10 +163,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 |