/** * Updates a particular model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id the ID of the model to be updated */ public function actionUpdate() { $modelCausa = new Causa(); $model = $modelCausa->findByPk($_POST['idCausaEditar']); $model->nombre = $_POST['nombreCausaEditar']; $model->id_tipo_causa = $_POST['idTipoCausaCausaEditar']; $model->save(); $this->redirect(array('default/index')); }