aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/caching.rb')
-rw-r--r--actionpack/lib/action_controller/caching.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index 3f54e5d383..df25fed3b2 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -521,9 +521,10 @@ module ActionController #:nodoc:
class Sweeper < ActiveRecord::Observer #:nodoc:
attr_accessor :controller
- # ActiveRecord::Observer will mark this class as reloadable even though it should be
+ # 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.included_modules
- super() - [ Reloadable ]
+ self == Sweeper ? super() - [ Reloadable ] : super()
end
def before(controller)