diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-12-16 21:37:48 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-12-16 22:24:48 +0100 |
commit | e89fff2f6b815529cf729fc8e900a8275c9514e8 (patch) | |
tree | 726650bd29573e6d3aa80107c293b20424287d79 /actionpack/lib/action_view/template/resolver.rb | |
parent | 81cf98d34268546532aa763b2837b3a4c87e60e1 (diff) | |
download | rails-e89fff2f6b815529cf729fc8e900a8275c9514e8.tar.gz rails-e89fff2f6b815529cf729fc8e900a8275c9514e8.tar.bz2 rails-e89fff2f6b815529cf729fc8e900a8275c9514e8.zip |
Bring back config.action_view.cache_template_loading [#5847 state:resolved]
Diffstat (limited to 'actionpack/lib/action_view/template/resolver.rb')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index a17454da28..0dccc99d14 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -5,6 +5,13 @@ require "action_view/template" module ActionView # = Action View Resolver class Resolver + cattr_accessor :caching + self.caching = true + + class << self + alias :caching? :caching + end + def initialize @cached = Hash.new { |h1,k1| h1[k1] = Hash.new { |h2,k2| h2[k2] = Hash.new { |h3,k3| h3[k3] = Hash.new { |h4,k4| h4[k4] = {} } } } } @@ -23,9 +30,7 @@ module ActionView private - def caching? - @caching ||= !defined?(Rails.application) || Rails.application.config.cache_classes - end + delegate :caching?, :to => "self.class" # This is what child classes implement. No defaults are needed # because Resolver guarantees that the arguments are present and |