FEATURE: log topic/post deletions from staff members

This commit is contained in:
Régis Hanol
2014-10-01 17:40:13 +02:00
parent be93f224a6
commit 98b6b9821a
14 changed files with 155 additions and 33 deletions

View File

@@ -167,7 +167,7 @@ class PostsController < ApplicationController
guardian.ensure_can_delete!(post)
destroyer = PostDestroyer.new(current_user, post)
destroyer = PostDestroyer.new(current_user, post, { context: params[:context] })
destroyer.destroy
render nothing: true

View File

@@ -211,7 +211,7 @@ class TopicsController < ApplicationController
guardian.ensure_can_delete!(topic)
first_post = topic.ordered_posts.first
PostDestroyer.new(current_user, first_post).destroy
PostDestroyer.new(current_user, first_post, { context: params[:context] }).destroy
render nothing: true
end