comfy/comfortable-mexican-sofa — pull request #149 by holli (2012-02-12 19:03:52+00:00)
Title: Added config option for sweepers in admin base controller

I'm using sweepers to reset some external caches and send emails when someone updates pages in cms.

This patch just enables easy way on including sweeper.

I could put the following example to wiki etc.

```
class CmsAdminSweeper < ActionController::Caching::Sweeper
observe Cms::Page, Cms::Layout, Cms::Snippet

def after_create(model)
do_sweeping(model)
end

def after_update(model)

end

ef after_destroy(model)
do_sweeping(model)
end

def do_sweeping(model)
return false if session.blank? || assigns(:site).blank?

Rails.logger.info("CmsAdminSweeper.do_sweeping in progress...")
```