From 8fdf3d7890d2e58508e028c93d3797f21a774dbc Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 17 Jun 2009 16:14:05 -0700 Subject: Remove some defined?(Http) checks --- actionpack/lib/action_controller/caching/actions.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'actionpack/lib/action_controller/caching/actions.rb') diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb index 54148b55d8..4420678df6 100644 --- a/actionpack/lib/action_controller/caching/actions.rb +++ b/actionpack/lib/action_controller/caching/actions.rb @@ -62,14 +62,7 @@ module ActionController #:nodoc: cache_filter = ActionCacheFilter.new(:layout => options.delete(:layout), :cache_path => options.delete(:cache_path), :store_options => options) - # TODO: Remove this once new base is swapped in. - if defined?(ActionController::Http) - around_filter cache_filter, filter_options - else - around_filter(filter_options) do |controller, action| - cache_filter.filter(controller, action) - end - end + around_filter cache_filter, filter_options end end -- cgit v1.2.3 From 55ee0ba7f5b6b5d2023eb5dcc030946ed589fe53 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 17 Jun 2009 16:23:11 -0700 Subject: Cleaning up if defined?(ActionController::Http) blocks from the pre new base era. --- actionpack/lib/action_controller/caching/actions.rb | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'actionpack/lib/action_controller/caching/actions.rb') diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb index 4420678df6..d8a1662acc 100644 --- a/actionpack/lib/action_controller/caching/actions.rb +++ b/actionpack/lib/action_controller/caching/actions.rb @@ -84,19 +84,10 @@ module ActionController #:nodoc: @options = options end - # TODO: Remove once New Base is merged - if defined?(ActionController::Http) - def filter(controller) - should_continue = before(controller) - yield if should_continue - after(controller) - end - else - def filter(controller, action) - should_continue = before(controller) - action.call if should_continue - after(controller) - end + def filter(controller) + should_continue = before(controller) + yield if should_continue + after(controller) end def before(controller) -- cgit v1.2.3