in devise, the forms look like this:
form_for(:resource, @resource, :url => edit_user(resource), :html => {:method=> put}) do |f|
but I’m wondering, does it have to include method => put? Isn’t REST supposed to have taken care of that already?
I’ve tried using form_for(@resource) but it does not get the edit user path. I think I am missing something here. Any help will be very much helpful. Thanks!
One of there rails guides talks about this, here is a snippet:
You populate this hidden input using
:html => {:method=> put}this gives rails a bit of hint. Using this hint and the url you’re submitting to rails can work out which of the restful action to submit the form to.Have a read of that rails guide that I linked to, things should become a lot clearer after that.