3 ms·
Rails addresses this by interpreting a special _method parameter: http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-form_tag ht
by twic 12y ago
Rails addresses this by interpreting a special _method parameter:
http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-form_tag http://api.rubyonrails.org/classes/ActionView/Helpers/FormTa...
That is, a POST containing _method=delete will be interpreted as a DELETE.
It seems faintly silly; if you're exposing an API to the browser, why use methods that you can't use directly and then have to go to the effort of emulating them, when you could just use supported methods directly? Is the use of the proper methods really that important?
But it does work.