rest - How rails issue put method on update? -


edit.html.erb file, scramble ready, I do not specify any code

< How does the Post Form Call Update action come with Code> PUT method PUT method?

This would be best estimate for sending the form for form_ :

Take the following code for example:

  & lt;% form_for @user | Form | & Gt%;  
  1. If @user is a new record, then this POST request is / user
  2. If @user is an existing record, then it will send the PUT request to / user / 12 (if 12 = @ User.id)

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -