aboutsummaryrefslogtreecommitdiffstats
path: root/app/sweepers
diff options
context:
space:
mode:
Diffstat (limited to 'app/sweepers')
-rw-r--r--app/sweepers/refinery/blog_sweeper.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/sweepers/refinery/blog_sweeper.rb b/app/sweepers/refinery/blog_sweeper.rb
index ceed5fa..a58ac7e 100644
--- a/app/sweepers/refinery/blog_sweeper.rb
+++ b/app/sweepers/refinery/blog_sweeper.rb
@@ -1,26 +1,26 @@
module Refinery
class BlogSweeper < ActionController::Caching::Sweeper
- observe BlogPost, BlogComment
-
+ observe Blog::Post, Blog::Comment
+
def after_create(record)
expire_cache_for(record)
end
-
+
def after_update(record)
expire_cache_for(record)
end
-
+
def after_destroy(record)
expire_cache_for(record)
end
-
+
private
-
+
def expire_cache_for(record)
# TODO: Convert these to url helpers
expire_page '/blog'
expire_page '/blog/feed.rss'
end
-
+
end
end