diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 4caeb1414..fe11cb8ae 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -10,7 +10,7 @@ class CommentsController < ApplicationController respond_to :json, :only => :show def create - target = Post.find_by_id params[:comment][:post_id] + target = current_user.find_visible_post_by_id params[:comment][:post_id] text = params[:comment][:text] @comment = current_user.comment text, :on => target