From 1bce58b31289362d62863ad0600b924858a11e34 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Thu, 2 Feb 2006 05:41:00 +0000 Subject: Add Reloadable::OnlySubclasses which handles the common case where a base class should not be reloaded, but its subclasses should be. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/caching.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller/caching.rb') diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index e62fe11a19..5e6fe3948b 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -523,10 +523,8 @@ module ActionController #:nodoc: # ActiveRecord::Observer will mark this class as reloadable even though it should not be. # However, subclasses of ActionController::Caching::Sweeper should be Reloadable - def self.reloadable? #:nodoc: - self != Sweeper - end - + include Reloadable::OnlySubclasses + def before(controller) self.controller = controller callback(:before) -- cgit v1.2.3