On page 212 of the PDF you use a form_tag for the session login form. According to the Rails 7 documentation form_for and form_with have been soft deprecated in favour of form_with so I guess that should be a form_with declaration rather than form_tag
I’m leaving the use of form_tag, but added a note:
It is possible to get the same results by using
form_with
with no parameters, but that’s a bit confusing.