From bbd3e3966876ff76f33fee5b633004a1c636688c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 20 Jan 2005 17:54:06 +0000 Subject: Fixed no-binding fragment caching git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/cache_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/helpers/cache_helper.rb') diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb index 9353e5a694..de2707ac75 100644 --- a/actionpack/lib/action_view/helpers/cache_helper.rb +++ b/actionpack/lib/action_view/helpers/cache_helper.rb @@ -2,8 +2,8 @@ module ActionView module Helpers # See ActionController::Caching::Fragments for usage instructions. module CacheHelper - def cache(name = {}) - @controller.cache_erb_fragment(binding, name) { yield } + def cache(name = {}, &block) + @controller.cache_erb_fragment(block, name) end end end -- cgit v1.2.3