Browsers don't support PUT and DELETE. They can send GET and POST only.
PUT and DELETE are emulated in rails by adding the `_method` parameter to the form. RightJS can do that automatically if you specify the 'method' option. Kinda like that
this.send({
method: 'delete'
});
Or you can add method="post" and <input type="hidden" name="_method" value="delete"/> on your form and then just call `this.send()`
--
Cheers,
Nikolay
> --
> You received this message because you are subscribed to the Google Groups "RightJS" group.
> To post to this group, send email to rig...@googlegroups.com.
> To unsubscribe from this group, send email to rightjs+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rightjs?hl=en.
>
Your server can catch that `_method` parameter and route your request as DELETE in your application. But in reality it is still a POST request
--
Nikolay V. Nemshilov
The Web-Developer
Xhr + method: 'delete' - works for sure in Rails, I use it on many projects, the problem must be somewhere else.
Try to make your form to have method="post" and embed the hidden _method field on it. Then try to send the form.
> For more options, visit this group at http://groups.google.com/group/rightjs?hl=en.
No worries. This is what the group for :)
--
Cheers,
Nikolay