Add select to change board of post

This commit is contained in:
riggraz
2019-09-21 12:54:57 +02:00
parent 7874015580
commit 7729057180
13 changed files with 222 additions and 33 deletions

View File

@@ -45,7 +45,8 @@ class PostsController < ApplicationController
return
end
post.post_status_id = params[:post][:post_status_id]
post.board_id = params[:post][:board_id] if params[:post].has_key?(:board_id)
post.post_status_id = params[:post][:post_status_id] if params[:post].has_key?(:post_status_id)
if post.save
render json: post, status: :no_content