We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69ffb2d commit d3e6221Copy full SHA for d3e6221
1 file changed
app/controllers/comments_controller.rb
@@ -288,7 +288,11 @@ def post_follow
288
def post_unfollow
289
@post = Post.find(params[:post_id])
290
ThreadFollower.where(post: @post, user: current_user).destroy_all
291
- redirect_to post_path(@post)
+
292
+ respond_to do |format|
293
+ format.html { redirect_to post_path(@post) }
294
+ format.json { render json: { status: 'success' } }
295
+ end
296
end
297
298
def pingable
0 commit comments