Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

sweepers now work

  • Loading branch information...
commit 17e45021007ca03954b1b5a5784a617f2f55d2f0 1 parent 51a639b
@dimko dimko authored
View
2  app/controllers/monitorships_controller.rb
@@ -1,6 +1,8 @@
class MonitorshipsController < ApplicationController
before_filter :login_required
+ cache_sweeper :monitorships_sweeper
+
def create
@monitorship = Monitorship.find_or_initialize_by_user_id_and_topic_id(current_user.id, params[:topic_id])
@monitorship.update_attribute :active, true
View
2  app/controllers/posts_controller.rb
@@ -2,6 +2,8 @@ class PostsController < ApplicationController
before_filter :find_parents
before_filter :find_post, :only => [:edit, :update, :destroy]
+ cache_sweeper :posts_sweeper, :only => [:create, :update, :destroy]
+
# /posts
# /users/1/posts
# /forums/1/posts
Please sign in to comment.
Something went wrong with that request. Please try again.