Skip to content

Instantly share code, notes, and snippets.

@damour
Created June 27, 2013 11:45
Show Gist options
  • Select an option

  • Save damour/5875841 to your computer and use it in GitHub Desktop.

Select an option

Save damour/5875841 to your computer and use it in GitHub Desktop.
yii ajax flash messages
if (isset($_POST['CategoryFeatureRestrictedValue'])) {
$model->attributes = $_POST['CategoryFeatureRestrictedValue'];
if ($model->validate()) {
//$response['status'] = $model->save();
//$response['flash_msg'] = Yii::app()->user->getFlashes();
//echo CJSON::encode($response);
$this->redirect(array('index', 'categoryFeatureId' => $model->category_feature_id));
} else {
//Yii::app()->user->setFlash('category', 'Category feature was saved successfully');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment