This commit is contained in:
r888888888
2014-03-19 14:21:53 -07:00
parent bfd8c0082d
commit 05c3795e6a
3 changed files with 24 additions and 4 deletions

View File

@@ -55,14 +55,14 @@ class ForumPostsController < ApplicationController
def destroy
@forum_post = ForumPost.find(params[:id])
check_privilege(@forum_post)
@forum_post.update_column(:is_deleted, true)
@forum_post.delete!
respond_with(@forum_post)
end
def undelete
@forum_post = ForumPost.find(params[:id])
check_privilege(@forum_post)
@forum_post.update_attribute(:is_deleted, false)
@forum_post.undelete!
respond_with(@forum_post)
end