From 4163ccec2343ee66e2488f067eab2a15260e1219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 22 Apr 2010 12:00:13 +0200 Subject: Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests. --- actionpack/lib/action_controller/caching.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller/caching.rb') diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 0da0ca1893..4105f9e14f 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -63,12 +63,10 @@ module ActionController #:nodoc: included do extend ConfigMethods - delegate :perform_caching, :perform_caching=, :to => :config - singleton_class.delegate :perform_caching, :perform_caching=, :to => :config - self.perform_caching = true + config_accessor :perform_caching + self.perform_caching = true if perform_caching.nil? end - def caching_allowed? request.get? && response.status == 200 end -- cgit v1.2.3