how does rails know if it should submit a form to update or create?

how does rails know if it should submit a form to update or create? the form is rendered by either new or edit so on submission how does rails know which action originally rendered the form?

by checking the value returned by `object.persisted?`.

Have a look at the html for the edit and new pages and I think you
will see a difference. Look at the form tag in particular.

Colin

they’re the same, <%= render ‘form’ %> is all they contain other than links and either

New model

or

Editing model

they’re the same, <%= render ‘form’ %> is all they contain other than links and either

New model

or

Editing model

I said to look at the HTML not your source code. The form tag is the HTML generated by the form_for code.

Also please don’t top post, as I have asked before. Thanks.

Colin