diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-05 14:38:16 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-05 14:38:16 -0300 |
commit | 1c8539da4738d51795422903b84f79705bc854cc (patch) | |
tree | f908423325a484b9226695127ca1f3191b543d62 /actionpack/lib/action_view | |
parent | d8dee214e39e806dc1b5bc5c148a347d974984f4 (diff) | |
download | rails-1c8539da4738d51795422903b84f79705bc854cc.tar.gz rails-1c8539da4738d51795422903b84f79705bc854cc.tar.bz2 rails-1c8539da4738d51795422903b84f79705bc854cc.zip |
Define just the cattr_reader.
This will trim down the API and avoid some error that can be made
changing the cache object.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/digestor.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ module ActionView ([@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 |