From 4948cd5317b3b3bc578aeafae80c835cd8780a2d Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 1 Jul 2014 22:49:41 -0600 Subject: render json of deleted cake. --- app/controllers/api/v1/cakes_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/controllers/api') diff --git a/app/controllers/api/v1/cakes_controller.rb b/app/controllers/api/v1/cakes_controller.rb index 62b9187b..c8241b6c 100644 --- a/app/controllers/api/v1/cakes_controller.rb +++ b/app/controllers/api/v1/cakes_controller.rb @@ -36,8 +36,9 @@ module Api end def destroy - current_user.creations.find(params[:id]).destroy! - render nothing: true + @cake = current_user.creations.find(params[:id]) + @cake.destroy! + respond_with(@cake) end private -- cgit v1.2.3