/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); $this->deleteEmptyRecord(); $model = new LocalEvent(); $model->save(false); $this->redirect(array('update', 'id' => $model->id, 'newRecord' => true)); }