/**
  * Updates an existing Comments model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id
  * @return mixed
  */
 public function actionCreate($user_id = null, $object = null, $object_id = null)
 {
     $model = new Comments();
     $model->setScenario('admin-update');
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return 'OK';
     } else {
         $model->date_create = date('d.m.Y H:i:s');
         if ($user_id != null) {
             $model->user_id = $user_id;
         }
         if ($object != null && $object_id != null) {
             $model->object = $object;
             $model->object_id = $object_id;
         }
         if (Yii::$app->request->isAjax) {
             return $this->renderAjax('create', ['model' => $model]);
         }
         return $this->render('create', ['model' => $model]);
     }
 }