public function actionDelete($resource_type, $id) { $ref = $this->getRef($resource_type, $id); $tx = Yii::app()->db->beginTransaction(); $ref->delete(); $tx->commit(); $this->sendResponse(204); }