search for: expire_about

Displaying 1 result from an estimated 1 matches for "expire_about".

2007 Oct 24
0
Sweeper for few models
For example - i have a sweeper for one model(in this case About). class AboutSweeper < ActionController::Caching::Sweeper observe About def after_create(data) expire_about(data) end def after_save(data) expire_about(data) end def after_destroy(data) expire_about(data) end def expire_about(data) FileUtils.rm_rf File.expand_path("public/about/#{data.id}", RAILS_ROOT) FileUtils.rm_rf File.expand_path("public/index.html", R...