BUGFIX: history link doesn't work on deleted posts

This commit is contained in:
Régis Hanol
2014-02-04 20:05:50 +01:00
parent 36683ff1e3
commit 4fb274fb9d
7 changed files with 92 additions and 3 deletions
+2
View File
@@ -216,6 +216,8 @@ class PostsController < ApplicationController
raise Discourse::InvalidParameters.new(:revision) if revision < 2
post_revision = PostRevision.where(post_id: post_id, number: revision).first
post_revision.post = find_post_from_params
guardian.ensure_can_see!(post_revision)
post_revision
end