lyntaff
(lyntaff)
1
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.
11175
(-- --)
2
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?
lyntaff
(lyntaff)
3
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?
lyntaff
(lyntaff)
4
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?
Mike27
(Mike)
5
This route allows put requests on the update action which is routed to
the url :controller/:id