diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-29 08:26:45 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-29 08:26:45 +0000 |
commit | d15d15b2c236a556f89536961adf2de7f1fd04dc (patch) | |
tree | 37f35f4cec5c7bdf34cbf6fbcd2a5ef44cf8a97c /actionpack/lib/action_controller/caching.rb | |
parent | d7b5b44a0e6fddb772c1c0779489c17e1caa4a39 (diff) | |
download | rails-d15d15b2c236a556f89536961adf2de7f1fd04dc.tar.gz rails-d15d15b2c236a556f89536961adf2de7f1fd04dc.tar.bz2 rails-d15d15b2c236a556f89536961adf2de7f1fd04dc.zip |
Deprecate @response
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5207 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/caching.rb')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 |