Update the code example (4+ years old) to set the form/changeset action to a conventional name unrelated to database operations, as suggested elsewhere in the docs 1.
Also use the new :action option added to to_form in v1.0 2.
Notes:
I've also reviewed other places where to_form is used, this was the only occurrence that seemed to deserve an update.
I'm not strong about using the new option to_form(..., action: :validate); if we want to keep the example backwards-compatible we shall keep using a Map.put(:action, :validate).
Update the code example (4+ years old) to set the form/changeset action to a conventional name unrelated to database operations, as suggested elsewhere in the docs 1.
Also use the new
:action
option added toto_form
in v1.0 2.Notes:
to_form
is used, this was the only occurrence that seemed to deserve an update.to_form(..., action: :validate)
; if we want to keep the example backwards-compatible we shall keep using aMap.put(:action, :validate)
.