From 1c8539da4738d51795422903b84f79705bc854cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 5 Sep 2012 14:38:16 -0300 Subject: [PATCH] Define just the cattr_reader. This will trim down the API and avoid some error that can be made changing the cache object. --- actionpack/lib/action_view/digestor.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_view/digestor.rb b/actionpack/lib/action_view/digestor.rb index 2ffcdd3e97..5d3add4091 100644 --- a/actionpack/lib/action_view/digestor.rb +++ b/actionpack/lib/action_view/digestor.rb @@ -18,7 +18,8 @@ class Digestor ([@a-z"'][@a-z_\/\."']+) # the template name itself -- 2nd capture /x - cattr_accessor(:cache) { Hash.new } + cattr_reader(:cache) + @@cache = Hash.new def self.digest(name, format, finder, options = {}) cache["#{name}.#{format}"] ||= new(name, format, finder, options).digest -- GitLab