Sha256: d32902246e65458724fdcdf3093684d49863162087ffc2fd63be6f65c2bf5b8b
Contents?: true
Size: 499 Bytes
Versions: 5
Compression:
Stored size: 499 Bytes
Contents
class FeedKiller < ActiveRecord::Observer observe Post def after_save(post) @user = post.user.username end def filter(controller) # Invalidate the user's feed controller.expire_page :controller => 'rss', :action => @user controller.expire_page :controller => 'atom', :action => @user # Invalidate the main feeds controller.expire_page :controller => 'rss', :action => 'index' controller.expire_page :controller => 'atom', :action => 'feed' end end
Version data entries
5 entries across 5 versions & 1 rubygems