aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/cache_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb
index 059f2edf0f..ea505adfa7 100644
--- a/actionpack/lib/action_view/helpers/cache_helper.rb
+++ b/actionpack/lib/action_view/helpers/cache_helper.rb
@@ -32,8 +32,8 @@ module ActionView
# <i>Topics listed alphabetically</i>
# <% end %>
def cache(name = {}, options = nil, &block)
- template_extension = find_template_extension_for(first_render)[/\.(\w+)$/, 1].to_sym
- handler = Base.handler_for_extension(template_extension)
+ template_extension = find_template_extension_for(first_render)[/\.?(\w+)$/, 1].to_sym
+ handler = Base.handler_class_for_extension(template_extension)
handler.new(@controller).cache_fragment(block, name, options)
end
end