FIX: Clearing flags wasn't making topics visible again.

This commit is contained in:
Robin Ward
2013-05-24 16:03:20 -04:00
parent d1fdc66ca4
commit 3037e9adf6
3 changed files with 15 additions and 20 deletions

View File

@ -100,9 +100,8 @@ where id in (?)"
def clear
p = Post.find(params[:id])
PostAction.clear_flags!(p, current_user.id)
p.hidden = false
p.hidden_reason_id = nil
p.save
p.reload
p.unhide!
render nothing: true
end
end