/** * Manages all models. */ public function actionAdmin() { $model = new Tarea('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Tarea'])) { $model->attributes = $_GET['Tarea']; } if (count($model->findAll()) > 0) { $this->render('admin', array('model' => $model)); } else { $this->render('empty', array('model' => $model)); } /* $this->render('admin', array( 'model' => $model, )); */ }