destroys and returns the resource, using the passed id, defaults to the current params[:id]
969354
def destroy_resource(id = nil)
      id ||= respond_to?(:params) && params.is_a?(ActionController::Parameters) && params[:id]
      resource_service.destroy id
    end
682639
def destroy(bulk=false)
      caught = catch(:halt)  do
        _run_destroy_callbacks do
          result = database.delete_doc(self, bulk)
          if result['ok']
            self.delete('_rev')
            self.delete('_id')
          end
          result['ok']
        end
      end
    end
1155828
def destroy
      return false if new_record?

      run_callbacks :destroy do
        httparty = self.class.delete(self[:@url], request_options)
        self.class.handle_critical_response_errors(httparty)
      end

      true
    end
1034627
function destroy( $id )
	{
		$this->id_format($id);
		$params = array();
		$params['id'] = $id;
		return $this->oauth->post( 'statuses/destroy',  $params );
	}
1277549
def destroy(name):
    '''
    
    '''
    node = show_instance(name, call='action')
    params = {'SUBID': node['SUBID']}
    result = _query('server/destroy', method='POST', decode=False, data=_urlencode(params))

    # The return of a destroy call is empty in the case of a success.
    # Errors are only indicated via HTTP status code. Status code 200
    # effetively therefore means "success".
    if result.get('body') == '' and result.get('text') == '':
        return True
    return result
437749
def destroy(*args)
      resource = find(*args)
      if enclosing_resource
        service.destroy(*args)
        resource
      else
        resource.destroy
      end
    end
143225
def delete_resource(resource_id):
    """"""
    resource_obj = app.db.resource(resource_id)
    try:
        os.remove(resource_obj.path)
    except OSError as err:
        app.logger.debug(err.message)

    app.db.delete_resource(resource_id)
    return redirect(request.referrer)
1193997
def delete(id)
      return true unless id
      with_redis { |redis| redis.del(redis_key_for(id)) }
      true
    end
834679
def id
      id_attr = resource[:id]
      return id_attr.to_s if id_attr.present? && id_attr.is_a?(::Valkyrie::ID) && !id_attr.blank?
      return "" unless resource.respond_to?(:alternate_ids)
      resource.alternate_ids.first.to_s
    end
1195931
def resource(id)
      hash = http_get(url('/resources/%s', id))
      Resource.new(hash)
    rescue ::Hawkular::Exception => e
      return if e.cause.is_a?(::RestClient::NotFound)
      raise
    end
1131483
function destroy(req, res, next) {
  db.posts.del(req.params.post, function(err) {
    if(err) { return next(err); }
    res.json(null);
    signals.emit('post:destroy', req.params.post);
  });
}
407057
def delete(id)
      unless Debugger.started? && Debugger.remove_breakpoint(id)
        raise ArgumentError, "No breakpoint ##{id}"
      end
      Pry.processor.debugging = false if to_a.empty?
    end
534241
def delete(self, id):
        
        url = self._url('%s' % (id))
        return self.client.delete(url)
30862
def destroy
      @translation = Translation.find(params[:id])
      @translation_id = @translation.id
      @translation_key_before_status = @translation.key.status session[:lang_to]
      @translation_key_id = @translation.key.id
      @translation.destroy
      @translation_key_after_status = @translation.key.status session[:lang_to]

      respond_to do |format|
        format.js
      end
    end
928775
def delete_resource(self, resource_id):
        
        # resource_id could be a path such as '/asset/123' so quote
        uri = self._get_resource_uri(guid=resource_id)
        return self.service._delete(uri)
636422
def delete(self, resource_id):
        

        endpoint = '{}/{}'.format(self.endpoint, resource_id)

        response = self.api.execute("DELETE", endpoint)

        if not response.ok:
            raise Error.parse(response.json())

        return self._cls.parse(response.json())
541734
def destroy
      @resource = model.find(params[:id])
      authorize @resource

      @resource_title = t(_resource_title.singularize)

      before_destroy_hook(@resource)
      @resource.destroy

      return if _override_views.include? :destroy
      render 'faalis/dashboard/resource/destroy'
    end