diff options
| author | Jon Leighton <j@jonathanleighton.com> | 2010-10-19 18:16:52 +0100 |
|---|---|---|
| committer | Jon Leighton <j@jonathanleighton.com> | 2010-10-19 18:16:52 +0100 |
| commit | 8345a141d12d75418613395259ef5a1112373b06 (patch) | |
| tree | 1b86f1f0334e5132f46260bb9f43b525a5037be2 /actionpack/lib/action_controller/caching | |
| parent | 2c7183c0260ca105c6440b31f60ac010891b69a9 (diff) | |
| parent | 1856e975c380920b5d4a67e903ed7c96624fd27b (diff) | |
| download | rails-8345a141d12d75418613395259ef5a1112373b06.tar.gz rails-8345a141d12d75418613395259ef5a1112373b06.tar.bz2 rails-8345a141d12d75418613395259ef5a1112373b06.zip | |
Merge branch 'master' into nested_has_many_through
Diffstat (limited to 'actionpack/lib/action_controller/caching')
| -rw-r--r-- | actionpack/lib/action_controller/caching/pages.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/caching/pages.rb b/actionpack/lib/action_controller/caching/pages.rb index df4d500069..104157d0b1 100644 --- a/actionpack/lib/action_controller/caching/pages.rb +++ b/actionpack/lib/action_controller/caching/pages.rb @@ -134,7 +134,7 @@ module ActionController #:nodoc: # If no options are provided, the requested url is used. Example: # cache_page "I'm the cached content", :controller => "lists", :action => "show" def cache_page(content = nil, options = nil) - return unless self.class.perform_caching && caching_allowed + return unless self.class.perform_caching && caching_allowed? path = case options when Hash @@ -148,10 +148,6 @@ module ActionController #:nodoc: self.class.cache_page(content || response.body, path) end - private - def caching_allowed - request.get? && response.status.to_i == 200 - end end end end |
