Allows flagging comments as inappropriate

This commit is contained in:
kikito
2015-08-20 18:47:16 +02:00
parent e5f893c8d1
commit e7effbf77c
7 changed files with 68 additions and 2 deletions

View File

@@ -22,6 +22,16 @@ class CommentsController < ApplicationController
respond_with @comment
end
def flag_as_inappropiate
InappropiateFlag.flag!(current_user, @comment)
respond_with @comment
end
def undo_flag_as_inappropiate
InappropiateFlag.unflag!(current_user, @comment)
respond_with @comment
end
private
def comment_params