FIX: Toggling post's wiki status should not create a new version.

This commit is contained in:
Guo Xiang Tan
2017-01-20 14:37:22 +08:00
parent 521ced38c5
commit 32846aad2a
8 changed files with 53 additions and 9 deletions

View File

@ -394,7 +394,7 @@ class PostsController < ApplicationController
post = find_post_from_params
guardian.ensure_can_wiki!(post)
post.revise(current_user, { wiki: params[:wiki] })
post.revise(current_user, { wiki: params[:wiki] }, { skip_revision: true })
render nothing: true
end