From d8b61175fe2fa9a33aaa31c893ec5f42b9a404ce Mon Sep 17 00:00:00 2001 From: Daniel Guettler Date: Sat, 12 Jul 2008 23:36:45 -0400 Subject: [PATCH] CacheHelper cache method with current_render_extension nil - only call to_sym on the current_render_extension if not nil otherwise pass nil to handler_class_for_extension which will select the default template class --- actionpack/lib/action_view/helpers/cache_helper.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb index 930c397..e44f49e 100644 --- a/actionpack/lib/action_view/helpers/cache_helper.rb +++ b/actionpack/lib/action_view/helpers/cache_helper.rb @@ -32,7 +32,7 @@ module ActionView # Topics listed alphabetically # <% end %> def cache(name = {}, options = nil, &block) - handler = Template.handler_class_for_extension(current_render_extension.to_sym) + handler = Template.handler_class_for_extension(current_render_extension && current_render_extension.to_sym || nil) handler.new(@controller).cache_fragment(block, name, options) end end -- 1.5.6