On Fri, Dec 25, 2015, at 16:16, fugee ohu wrote:
> 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?`.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/1451031441.3078396.476094858.4B52A410%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to