public function actionFork($id) { $bucket = Buckets::model()->findByPk($id); $data = $bucket->attributes; $new = new Buckets(); $new->setAttributes($data, false); $new->id = null; $new->student = Yii::app()->my->id; $new->save(); // $this->render("preview",array("bucket"=>$bucket)); Yii::app()->notify->add("Что-то пошло не так"); $this->redirect(array('/sandbox/' . $new->id . '/edit')); }