How do forms pass the id to the controller in normal basic scaffolding? There’s no id field in the form, there’s no magic that passes the form’s container object to the controller, rather every parameter is explicity provided in input fields of the form, except the id, so how does the id get passed to the controller? Something in the forms syntax extracts the id from the @object and puts it in the form but i dunno what Thanks in advance
Did you look in the params hash that is sent from your form when you submit it? What's the very last element in the params (usually, and in a scaffolded demo, always)? Note: I am speaking of the params you would get in an update (PATCH), not a create (POST), as you asked specifically about the id, and a POST won't have one of those.