Reputation: 139
I need to redirect to another my own page after saving the data.To do that I duplicate create.php and _from.php (create_1.php and _from_1.php). But when I redirect to it yii give error 404
//AssimentController.php
if($this->saveed($data1,$studentid,$modelcrite,$model))
{
Yii::app()->session['model']=$model;
$this->actionCreate_1();
}
public function actionCreate_1()
{
$model=new Assiment;
$modelcrite=new AssimentMarks;
$this->redirect(array('create_1'),
array('model'=>$model,'modelcrite'=>$modelcrite,));
}
//in accessRules() function
array('allow', // allow all users to perform 'index' and 'view' actions
'actions'=>array('index','view','Create_1'),
'users'=>array('*'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update','Create_1'),
'users'=>array($user->isTeacher())
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin','delete','create','Create_1'),
'users'=>array($user->isAdmin())
),
can any one tell me how to solve this problem ?
Upvotes: 0
Views: 97
Reputation: 14860
The line
public function actionscreate_1()
should read
public function actionCreate_1()
Upvotes: 1