if (Yii::app()->request->isAjaxRequest)
{
echo CJSON::encode(array(
'status'=>'failure',
'div'=>$this->renderPartial('_form', array('model'=>$model), true)));
exit; // can I replace exit with Yii::app()->end()?
}
else
$this->render('create',array('model'=>$model,));
}
Can I replace
exit
here with
Yii::app()->end()
? why?
Thank you!