Commit 2272ed1b7c67c3556149b3f7af678d69497ab47a
1 parent
d921f437
Ratingbehavior fix.
Showing
2 changed files
with
2 additions
and
3 deletions
Show diff stats
common/behaviors/RatingBehavior.php
@@ -21,6 +21,8 @@ | @@ -21,6 +21,8 @@ | ||
21 | { | 21 | { |
22 | return [ | 22 | return [ |
23 | ActiveRecord::EVENT_AFTER_UPDATE => 'afterUpdate', | 23 | ActiveRecord::EVENT_AFTER_UPDATE => 'afterUpdate', |
24 | + ActiveRecord::EVENT_AFTER_DELETE => 'afterUpdate', | ||
25 | + ActiveRecord::EVENT_AFTER_INSERT => 'afterUpdate', | ||
24 | ]; | 26 | ]; |
25 | } | 27 | } |
26 | 28 |
common/models/Articles.php
@@ -49,9 +49,6 @@ class Articles extends \yii\db\ActiveRecord | @@ -49,9 +49,6 @@ class Articles extends \yii\db\ActiveRecord | ||
49 | 'out_attribute' => 'translit', | 49 | 'out_attribute' => 'translit', |
50 | 'translit' => true | 50 | 'translit' => true |
51 | ], | 51 | ], |
52 | - [ | ||
53 | - 'class' => RatingBehavior::className(), | ||
54 | - ], | ||
55 | ]; | 52 | ]; |
56 | } | 53 | } |
57 | 54 |