1
我有一个路线:的Rails 3:设置路径为“得到”
match 'api/v1/:id/:format/:date/(:type)', :controller => "xpto", :action => "api_xpto"
的目标是让它从外面的GET请求。但是,该路由不会被设置为GET。
我该如何让它成为GET?
我有一个路线:的Rails 3:设置路径为“得到”
match 'api/v1/:id/:format/:date/(:type)', :controller => "xpto", :action => "api_xpto"
的目标是让它从外面的GET请求。但是,该路由不会被设置为GET。
我该如何让它成为GET?
变化比赛到得到:通过选项
match 'api/v1/:id/:format/:date/(:type)', :controller => "xpto", :action => "api_xpto", :via => :get
实际上,':
或者添加as'用于命名路线。正确的选项是':via =>:get' – bassneck 2011-05-11 13:23:14
谢谢,写得太快了。编辑。 – iceydee 2011-05-11 13:24:38