lib/ahc_helper.rb in ahc-0.3.4 vs lib/ahc_helper.rb in ahc-0.3.5
- old
+ new
@@ -34,9 +34,11 @@
if resource.valid?
@data['resource'] = resource
else
@data['errors'] = resource.errors
end
+ when 'destroy'
+ return render json: {success: !resource.persisted?}
end
render_ahc("#{controller}/#{action}")
end
end