Exemplo n.º 1
0
 public function actionCreate()
 {
     $model = new Vehiculos();
     //$this->performAjaxValidation($model);
     if (isset($_POST['Vehiculos'])) {
         $model->setAttributes($_POST['Vehiculos']);
         if ($model->save()) {
             if (Yii::app()->getRequest()->getIsAjaxRequest()) {
                 Yii::app()->end();
             } else {
                 $this->redirect(array('view', 'id' => $model->id));
             }
         }
     }
     $this->render('create', array('model' => $model));
 }