#1326: Add checkbox to move favorites

This commit is contained in:
Toks
2013-12-17 12:14:32 -05:00
parent 13157cecfa
commit 27c80ba621
4 changed files with 33 additions and 19 deletions

View File

@@ -13,7 +13,7 @@ module Moderator
@post = ::Post.find(params[:id])
if params[:commit] == "Delete"
@post.flag!(params[:reason])
@post.delete!(:reason => params[:reason])
@post.delete!(:reason => params[:reason], :move_favorites => params[:move_favorites].present?)
end
redirect_to(post_path(@post))
end