元のチェック rs.reviewable_score_type == params.flag_type_id && rs.pending? は、フラグ付きのブーストが複数のユーザーによってフラグ付けされるのを防いでいました。ユーザーがすでにフラグ付きのブーストにフラグを付けようとすると、エラーメッセージ You have already flagged this boost.(このブーストにはすでにフラグを付けています)が表示されて失敗していました。
しかし、ユーザーが実際にはフラグを付けたことがない場合、これはユーザーを混乱させる可能性があります。
このコミットではこのチェックを削除し、複数のユーザーがブーストにフラグを付けられるようにしてこの問題を解決しました。また、いくつかのスペック(テスト)も追加しています。
なお、CI でエラーが発生しないようにプロジェクトのリンティングを行いました。
main ← small-lovely-cat:fix-boost-flag-by-multiple-users
approved 08:57AM - 20 Jul 26 UTC
The original check `rs.reviewable_score_type == params.flag_type_id && rs.pendin… g?` prevents a flagged boost from being flagged by multiple users. When a user trying to flag a flagged boost, it will go wrong with an error message: `You have already flagged this boost.`
However, this may make the user confused, since the user has never flagged it.
This commit removed this check, so that the boost can be flagged by multiple users, so as to solve this problem, also added some specs.
P.S., updated linting for the .rb files.
「いいね!」 2
j.jaffeux
(Joffrey Jaffeux)
2026 年 7 月 20 日午前 7:51
3
こんにちは、タイトルが間違っていますよね?「can」ではなく「can’t」が正しいはずです。
「いいね!」 2
はい、can’t であるべきでした。修正しました。
指摘していただきありがとうございます〜
「いいね!」 2
@small-lovely-cat さん、ありがとうございます
レビュー とマージ を完了しました。
「いいね!」 2