better revision history

This commit is contained in:
Régis Hanol
2013-12-12 03:41:34 +01:00
parent 14328a24ef
commit 06dd7ffe3c
47 changed files with 989 additions and 1844 deletions

View File

@@ -124,7 +124,7 @@ class PostDestroyer
Post.transaction do
@post.update_column(:user_deleted, false)
@post.skip_unique_check = true
@post.revise(@user, @post.versions.last.modifications["raw"][0], force_new_version: true)
@post.revise(@user, @post.revisions.last.modifications["raw"][0], force_new_version: true)
@post.update_flagged_posts_count
end
end