vendor/refinerycms/pages/lib/pages.rb in refinerycms-0.9.8 vs vendor/refinerycms/pages/lib/pages.rb in refinerycms-0.9.8.1
- old
+ new
@@ -1,9 +1,14 @@
require 'refinery'
+require 'awesome_nested_set'
module Refinery
module Pages
class Engine < Rails::Engine
+
+ # Register cache sweeper, ensuring that we don't overwrite any other observers.
+ config.autoload_paths += %W(#{config.root}/app/sweepers)
+ (config.active_record.observers ||= []) << :page_sweeper
config.after_initialize do
Refinery::Plugin.register do |plugin|
plugin.name = "refinery_pages"
plugin.directory = "pages"