diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-12-26 17:18:06 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-26 17:18:06 +0000 |
commit | 73e9f4e9096515e9f4d97baaa914320c42159985 (patch) | |
tree | db8fc9b9c07ca9a523a764ad76ce3b75254c73b3 /actionpack/lib/action_controller/caching | |
parent | 2cd8d3b4c5b2a90da52bfe2e92455fdecfb89ac2 (diff) | |
parent | 07298fd0929ae1c6dd6d1b41bf320112d6bfc6a0 (diff) | |
download | rails-73e9f4e9096515e9f4d97baaa914320c42159985.tar.gz rails-73e9f4e9096515e9f4d97baaa914320c42159985.tar.bz2 rails-73e9f4e9096515e9f4d97baaa914320c42159985.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'actionpack/lib/action_controller/caching')
-rw-r--r-- | actionpack/lib/action_controller/caching/actions.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/caching/pages.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/caching/sql_cache.rb | 18 |
3 files changed, 2 insertions, 20 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 diff --git a/actionpack/lib/action_controller/caching/sql_cache.rb b/actionpack/lib/action_controller/caching/sql_cache.rb deleted file mode 100644 index 139be6100d..0000000000 --- a/actionpack/lib/action_controller/caching/sql_cache.rb +++ /dev/null @@ -1,18 +0,0 @@ -module ActionController #:nodoc: - module Caching - module SqlCache - def self.included(base) #:nodoc: - if defined?(ActiveRecord) && ActiveRecord::Base.respond_to?(:cache) - base.alias_method_chain :perform_action, :caching - end - end - - protected - def perform_action_with_caching - ActiveRecord::Base.cache do - perform_action_without_caching - end - end - end - end -end
\ No newline at end of file |