@@ -88,7 +88,13 @@ class PostsController < ApplicationController
|
||||
@post = Post.find(params[:id])
|
||||
@other_post = Post.find(params[:other_post_id].to_i)
|
||||
@post.copy_notes_to(@other_post)
|
||||
render :nothing => true
|
||||
|
||||
if @post.errors.any?
|
||||
@error_message = @post.errors.full_messages.join("; ")
|
||||
render :json => {:success => false, :reason => @error_message}.to_json, :status => 400
|
||||
else
|
||||
head :no_content
|
||||
end
|
||||
end
|
||||
|
||||
def unvote
|
||||
|
||||
Reference in New Issue
Block a user