FEATURE: add new 'convert to staff message' in post wrench menu

This commit is contained in:
Régis Hanol
2014-09-10 23:08:33 +02:00
parent ffc136e9ac
commit 18f8038015
13 changed files with 119 additions and 15 deletions

View File

@ -241,6 +241,17 @@ class PostsController < ApplicationController
render nothing: true
end
def post_type
guardian.ensure_can_change_post_type!
post = find_post_from_params
post.post_type = params[:post_type].to_i
post.version += 1
post.save
render nothing: true
end
def flagged_posts
params.permit(:offset, :limit)
guardian.ensure_can_see_flagged_posts!