Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails render head: :ok

if object.save
  head :ok
else
  render json: { errors: object.errors }, status: :unprocessable_entity
end
 
PREVIOUS NEXT
Tagged: #rails #render
ADD COMMENT
Topic
Name
6+3 =