You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mostly equivalent to last, except it throws a record not found exception when no matching record is found. It seems to be a false positive on all of the ! variants of the methods, like second! or first!. last doesn't have the issue, but also requires that I get my application to 404 some other way.
Note that in my code I explicitly pass the path game_path to avoid the brakeman errors, but I would prefer not to.
The text was updated successfully, but these errors were encountered:
Background
Brakeman version: 5.2.3
Rails version: 7.0.3
Ruby version: 3.1.2
Link to Rails application code: link
False Positive
Full warning from Brakeman:
Relevant code:
Why might this be a false positive?
Mostly equivalent to
last
, except it throws a record not found exception when no matching record is found. It seems to be a false positive on all of the!
variants of the methods, likesecond!
orfirst!
.last
doesn't have the issue, but also requires that I get my application to 404 some other way.Note that in my code I explicitly pass the path
game_path
to avoid the brakeman errors, but I would prefer not to.The text was updated successfully, but these errors were encountered: