aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorKrekoten' Marjan <krekoten@gmail.com>2010-10-18 21:04:44 +0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-10-18 17:30:28 -0200
commit608bf7b72c227a3030db9418217d9a77325c2b21 (patch)
tree205a7ba8958441a3cbdd5c29eefaabd5f6ce07a7 /actionpack/lib/action_controller
parent19c144f1b3d441d2cc7b227c68b3971f12d42c0c (diff)
downloadrails-608bf7b72c227a3030db9418217d9a77325c2b21.tar.gz
rails-608bf7b72c227a3030db9418217d9a77325c2b21.tar.bz2
rails-608bf7b72c227a3030db9418217d9a77325c2b21.zip
AC::Caching DRYup
Remove ActionController::Caching::Pages#caching_allowed because it duplicates ActionController::Caching#caching_allowed? Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/caching/pages.rb6
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