FEATURE: add a specific flag reason when a post has been hidden

This commit is contained in:
Régis Hanol
2014-04-30 16:58:01 +02:00
parent 4b83a6f0a0
commit 11af466737
4 changed files with 25 additions and 10 deletions

View File

@ -23,8 +23,9 @@ class Admin::FlagsController < Admin::AdminController
def agree
p = Post.find(params[:id])
post_action_type = PostAction.post_action_type_for_post(p.id)
PostAction.defer_flags!(p, current_user.id)
PostAction.hide_post!(p)
PostAction.hide_post!(p, post_action_type)
render nothing: true
end
@ -33,4 +34,5 @@ class Admin::FlagsController < Admin::AdminController
PostAction.defer_flags!(p, current_user.id)
render nothing: true
end
end