From cf8a952b0b99de1eb59d9d21542f0627364712ca Mon Sep 17 00:00:00 2001 From: Abigail Sosa Date: Tue, 17 Nov 2015 20:47:27 -0700 Subject: [PATCH] Se pueden eliminar anotaciones --- app/controllers/annotations_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/controllers/annotations_controller.rb b/app/controllers/annotations_controller.rb index 3332fc204..e8267d593 100644 --- a/app/controllers/annotations_controller.rb +++ b/app/controllers/annotations_controller.rb @@ -16,7 +16,14 @@ class AnnotationsController < ApplicationController end end + def destroy + @annotation = Annotation.find(params[:id]) + @annotation.destroy + render json: { status: :ok } + end + private + def annotation_params params .require(:annotation)