When deleting a post as staff, ask if you want to delete direct replies too

This commit is contained in:
Robin Ward
2013-09-04 20:50:58 -04:00
parent f157ec1f91
commit 71c1b8b9b9
5 changed files with 53 additions and 13 deletions

View File

@ -159,8 +159,7 @@ class PostsController < ApplicationController
Post.transaction do
topic_id = posts.first.topic_id
posts.each {|p| p.destroy }
Topic.reset_highest(topic_id)
posts.each {|p| PostDestroyer.new(current_user, p).destroy }
end
render nothing: true