summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-07-01 22:49:41 -0600
committermo khan <mo@mokhan.ca>2014-07-01 22:49:41 -0600
commit4948cd5317b3b3bc578aeafae80c835cd8780a2d (patch)
treef8fe6120c364c62f4d4262794634137fff675226
parenta5db20d0bad654ef25651eeb3a30ea64ce8c78d3 (diff)
render json of deleted cake.
-rw-r--r--app/controllers/api/v1/cakes_controller.rb5
1 files changed, 3 insertions, 2 deletions
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