FEATURE: allow users to wikify their own posts based on trust level

This commit is contained in:
Arpit Jalan
2016-01-11 20:56:00 +05:30
parent 19c630e7c2
commit 06bac23e5f
10 changed files with 65 additions and 21 deletions

View File

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