News for hackers. Stuff that matters.
Re:HTML First – Six principles for building simple, maintain... by codeptualize on Sunday November 12, 2023 @03:52PM (#38243978)
I think this is a great example of all the small details we take for granted in the tools we use, and we would miss without realising when following these tips.
Re:HTML First – Six principles for building simple, maintain... by tonyennis on Sunday November 12, 2023 @03:58PM (#38244024)
That hidden CSRF field can be added without form_with though, and Rails still protects against not including it. I left it out of the example as it didn't seem relevant
Re:HTML First – Six principles for building simple, maintain... by stanislavb on Sunday November 12, 2023 @08:28PM (#38245882)
Yes, it can be added, but manually going over all form. Also, how would it protect against a CSRF without the token in place?

Note: I totally agree that we should strive to go HTML first. However, this specific example is a bit unfair.