code: public function actionActivate($id, $active)
      {
          $model = Item::findOne($id);
          $model->attributes = compact('active');
          $model->save();
      }
docs: Activates/deactivates model.
  @param integer $id model id.
  @param integer 1/0 $active whether to activate model.