public function actionIndex() { $this->pageName = 'Список голосований'; $model = new Poll('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Poll'])) { $model->attributes = $_GET['Poll']; } $this->render('index', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Poll('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Poll'])) { $model->attributes = $_GET['Poll']; } $this->render('admin', array('model' => $model)); }