开发者

REST/Rails questions - support for HTTP methods?

开发者 https://www.devze.com 2023-01-07 15:09 出处:网络
So I am getting this error for one of my routes. I\'am running Rails v2.3.8 + Mongrel 1.1.5. Does rails support only GET & POST??

So I am getting this error for one of my routes. I'am running Rails v2.3.8 + Mongrel 1.1.5. Does rails support only GET & POST??

ActionController::MethodNotAllowed (Only get and post requests are allowed.):

The route defined in my routes.rb is -

map.connect "#{base_url}/r/:id/rate?v=:value&u=:user_i开发者_如何学Pythond", :conditions => { :method => :put }, :controller => 'mycontroller', :action => 'myaction'


It does not mean that Rails support only these two methods. It means, that route that matched request (by URL) did not match any controller method (by http method).

0

精彩评论

暂无评论...
验证码 换一张
取 消