I get an error when trying to update a record when using a HTTP
request PUT method from a form complying with the RESTful routing for
the resource.
The error is: Only get and post requests are allowed.
Has anybody come accross this before?
Hope somebody can help.
Thanks in advance.
The error is: Only get and post requests are allowed.
This seems pretty straight forward…
What does your routes.rb look like?
For the model in question, does your like look something like:
map.resources :mymodels, :member => {:myaction => :put}
You’re trying to use a PUT, but have you told Rails to accept that for
that action?
In my routes.rb I only have:
map.resources :mymodel
Am I correct in saying that the PUT method is set automatically in the
RESTful routes while setting the resource?
In my routes.rb I only have:
map.resources :mymodel
Am I correct in saying that the PUT method is set automatically in the
RESTful routes while setting the resource?
Lyn Williams wrote:
In my routes.rb I only have:
map.resources :mymodel
Am I correct in saying that the PUT method is set automatically in the
RESTful routes while setting the resource?
http://api.rubyonrails.org/classes/ActionController/Resources.html
This route allows put requests on the update action which is routed to
the url :controller/:id
2009/6/12, lyntaff [email protected]:
–
Von meinen Mobilgerät aus gesendet