aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-12-19 15:05:51 -0600
committerJoshua Peek <josh@joshpeek.com>2008-12-19 15:05:51 -0600
commit3da1b94d07fbbd6cff342a822af1631ae167a9b8 (patch)
tree9d5c87ce38143ca196aa4681fc5a7678fb330073 /actionpack/lib/action_controller/caching
parent12e416a04b764d0b212e04a53b770f60dc0d7071 (diff)
downloadrails-3da1b94d07fbbd6cff342a822af1631ae167a9b8.tar.gz
rails-3da1b94d07fbbd6cff342a822af1631ae167a9b8.tar.bz2
rails-3da1b94d07fbbd6cff342a822af1631ae167a9b8.zip
Use status response accessor instead of the 'Status' header
Diffstat (limited to 'actionpack/lib/action_controller/caching')
-rw-r--r--actionpack/lib/action_controller/caching/actions.rb2
-rw-r--r--actionpack/lib/action_controller/caching/pages.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb
index 7c803a9830..34e1c3527f 100644
--- a/actionpack/lib/action_controller/caching/actions.rb
+++ b/actionpack/lib/action_controller/caching/actions.rb
@@ -113,7 +113,7 @@ module ActionController #:nodoc:
end
def caching_allowed(controller)
- controller.request.get? && controller.response.headers['Status'].to_i == 200
+ controller.request.get? && controller.response.status.to_i == 200
end
def cache_layout?
diff --git a/actionpack/lib/action_controller/caching/pages.rb b/actionpack/lib/action_controller/caching/pages.rb
index 22e4fbec43..bd3b5a5875 100644
--- a/actionpack/lib/action_controller/caching/pages.rb
+++ b/actionpack/lib/action_controller/caching/pages.rb
@@ -145,7 +145,7 @@ module ActionController #:nodoc:
private
def caching_allowed
- request.get? && response.headers['Status'].to_i == 200
+ request.get? && response.status.to_i == 200
end
end
end