Permalink
Browse files

Adding hack mentioned in rails-observers issue #4

  • Loading branch information...
1 parent 25ad85c commit e2fba819ee77b683a210115e814783a45606baeb @melindaweathers committed May 20, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rails/observers/action_controller/caching.rb
@@ -7,6 +7,8 @@ module Caching
autoload :Sweeping, 'rails/observers/action_controller/caching/sweeping'
end
- include Sweeping if defined?(ActiveRecord)
+ # As suggested by https://github.com/rails/rails-observers/issues/4
+ # include Sweeping if defined?(ActiveRecord)
+ ::ActionController::Base.send(:include, Sweeping) if defined?(ActiveRecord)
end
end

0 comments on commit e2fba81

Please sign in to comment.