/** * 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() { $modelObjetivo = new ObjetivoEstrategico(); $model = $modelObjetivo->findByPk($_POST['idObjetivoEditar']); $model->nombre = $_POST['nombreObjetivoEditar']; $model->id_dimension = $_POST['idDimensionObjetivoEditar']; $model->codigo = $_POST['codigoObjetivoEditar']; $model->save(); $this->redirect(array('default/index')); }