diff --git a/common/behaviors/RatingBehavior.php b/common/behaviors/RatingBehavior.php index 0d999ca..2200f4f 100755 --- a/common/behaviors/RatingBehavior.php +++ b/common/behaviors/RatingBehavior.php @@ -21,6 +21,8 @@ { return [ ActiveRecord::EVENT_AFTER_UPDATE => 'afterUpdate', + ActiveRecord::EVENT_AFTER_DELETE => 'afterUpdate', + ActiveRecord::EVENT_AFTER_INSERT => 'afterUpdate', ]; } diff --git a/common/models/Articles.php b/common/models/Articles.php index 7dec7ed..09776c8 100755 --- a/common/models/Articles.php +++ b/common/models/Articles.php @@ -49,9 +49,6 @@ class Articles extends \yii\db\ActiveRecord 'out_attribute' => 'translit', 'translit' => true ], - [ - 'class' => RatingBehavior::className(), - ], ]; } -- libgit2 0.21.4