Allows flagging comments as inappropriate
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user