diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 92eb8770df741b2f9a8316e5a839a17d2570b2ad..5ea5ab94ec5c29b39f9d010cec051a5eb9920d25 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -443,7 +443,7 @@ def cache_sweeper(*sweepers) end end - if defined?("ActiveRecord") + if defined?(ActiveRecord::Observer) class Sweeper < ActiveRecord::Observer attr_accessor :controller