Wiki Post

This commit is contained in:
Wojciech Zawistowski
2014-05-13 08:53:11 -04:00
parent 27c702464e
commit 960d64930c
26 changed files with 371 additions and 19 deletions

View File

@ -208,6 +208,17 @@ class PostsController < ApplicationController
render nothing: true
end
def wiki
guardian.ensure_can_wiki!
post = find_post_from_params
post.wiki = params[:wiki]
post.version += 1
post.save
render nothing: true
end
protected
def find_post_revision_from_params