If we only deliver the header, jquery raise an error.
This commit is contained in:
parent
0e1f3fc7ac
commit
a584f17b51
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue