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%;
- If
@user
is a new record, then thisPOST
request is/ user
- If
@user
is an existing record, then it will send thePUT
request to/ user / 12
(if 12 = @ User.id)
Comments
Post a Comment