From d15d15b2c236a556f89536961adf2de7f1fd04dc Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 29 Sep 2006 08:26:45 +0000 Subject: Deprecate @response git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5207 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/caching.rb | 8 ++++---- 1 file changed, 4 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 491d7d7d0c..e7782d3e22 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -125,17 +125,17 @@ module ActionController #:nodoc: end end - # Manually cache the +content+ in the key determined by +options+. If no content is provided, the contents of @response.body is used + # Manually cache the +content+ in the key determined by +options+. If no content is provided, the contents of response.body is used # If no options are provided, the current +options+ for this action is used. Example: # cache_page "I'm the cached content", :controller => "lists", :action => "show" def cache_page(content = nil, options = {}) return unless perform_caching && caching_allowed - self.class.cache_page(content || @response.body, url_for(options.merge({ :only_path => true, :skip_relative_url_root => true }))) + self.class.cache_page(content || response.body, url_for(options.merge({ :only_path => true, :skip_relative_url_root => true }))) end private def caching_allowed - !@request.post? && @response.headers['Status'] && @response.headers['Status'].to_i < 400 + !@request.post? && response.headers['Status'] && response.headers['Status'].to_i < 400 end end @@ -184,7 +184,7 @@ module ActionController #:nodoc: end end - class ActionCacheFilter #:nodoc: + class ActionCacheFilter #:nodoc: def initialize(*actions, &block) @actions = actions end -- cgit v1.2.3