This commit is contained in:
Toks
2013-10-09 13:05:06 -04:00
parent 516212b488
commit 59aa45e83b
4 changed files with 9 additions and 3 deletions

View File

@@ -49,6 +49,7 @@ class ForumTopicsController < ApplicationController
@forum_topic = ForumTopic.find(params[:id])
check_privilege(@forum_topic)
@forum_topic.update_column(:is_deleted, true)
flash[:notice] = "Topic deleted"
respond_with(@forum_topic)
end
@@ -56,6 +57,7 @@ class ForumTopicsController < ApplicationController
@forum_topic = ForumTopic.find(params[:id])
check_privilege(@forum_topic)
@forum_topic.update_column(:is_deleted, false)
flash[:notice] = "Topic undeleted"
respond_with(@forum_topic)
end