This commit is contained in:
albert
2013-03-17 20:56:34 -04:00
parent 781bfcef3c
commit 69607c0ea8
4 changed files with 23 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ class ForumPostsController < ApplicationController
def destroy
@forum_post = ForumPost.find(params[:id])
raise User::PrivilegeError unless CurrentUser.is_janitor?
raise User::PrivilegeError unless @forum_post.editable_by?(CurrentUser.user)
@forum_post.update_attribute(:is_deleted, true)
respond_with(@forum_post)
end