From a584f17b516f17b2cb5b61e4fbf42a39e990df23 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 31 Oct 2012 00:33:46 +0100 Subject: [PATCH] If we only deliver the header, jquery raise an error. --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6c51e8aac..9cef1159b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -244,7 +244,7 @@ class ApplicationController < ActionController::Base begin generic_object = object.find( params[:id] ) generic_object.destroy - head :ok + render :json => {}, :status => :ok rescue Exception => e logger.error e.message render :json => { :error => e.message }, :status => :unprocessable_entity