This commit is contained in:
Toks
2013-06-29 11:44:33 -04:00
parent 6af2bde6c3
commit 59db60f35c
2 changed files with 6 additions and 2 deletions

View File

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

View File

@@ -875,7 +875,11 @@ class Post < ActiveRecord::Base
update_column(:is_banned, true) if options[:ban] || has_tag?("banned_artist")
unless options[:without_mod_action]
ModAction.create(:description => "deleted post ##{id}")
if options[:reason]
ModAction.create(:description => "deleted post ##{id}, reason: #{options[:reason]}")
else
ModAction.create(:description => "deleted post ##{id}")
end
end
end
end