form_with multipart data
20 Jan 2024This whole time I thought I needed to do this for supporting files in forms:
form_with(model: attachment, html: { enctype: "multipart/form-data"} )
but it turns out you can actually just do this:
form_with(model: attachment, multipart: true)
which is cleaner and easier to remember.