Skip to content

Commit 6140bd3

Browse files
author
Igor Chepurnoy
committed
Update EditableAction.php
1 parent e08166a commit 6140bd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

EditableAction.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ public function run()
8787
$model->$attribute = $value;
8888

8989
if ($model->validate([$attribute])) {
90-
return $model->save(true, [$attribute]);
90+
// no need to specify which attributes as Yii2 handles that via [[BaseActiveRecord::getDirtyAttributes]]
91+
return $model->save(false);
9192
} else {
9293
throw new BadRequestHttpException($model->getFirstError($attribute));
9394
}

0 commit comments

Comments
 (0)