/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new Causa(); $model->nombre = $_POST['nombreCausa']; $model->id_tipo_causa = $_POST['idTipoCausaCausa']; $model->save(); $this->redirect(array('default/index')); }