我有以下途径:的Ruby-on-轨道路线问题
people GET /people(.:format) {:action=>"index", :controller=>"people"}
POST /people(.:format) {:action=>"create", :controller=>"people"}
new_person GET /people/new(.:format) {:action=>"new", :controller=>"people"}
edit_person GET /people/:id/edit(.:format) {:action=>"edit", :controller=>"people"}
person GET /people/:id(.:format) {:action=>"show", :controller=>"people"}
**PUT /people/:id(.:format) {:action=>"update", :controller=>"people"}**
DELETE /people/:id(.:format) {:action=>"destroy", :controller=>"people"}
然而,当我Flex客户端要求更新
" **<mx:HTTPService id = "update"
url='http://localhost:3000/people/{grid.selectedItem.id}.xml?_method=put**"
我得到的错误
**ActionController::RoutingError (No route matches "/people/1.xml"**.
即使我明确地(用于故障排除)将线路转换为**url='http://localhost:3000/people/1.xml?_method=put"
,错误仍然存在。*
我可以在地址栏中输入"http://localhost:3000/people/1.xml"
,没有错误。
我在做什么不正确?提前致谢。
貌似基于http://stackoverflow.com/questions/在机架中的错误在某种程度上
POST
要求做3732183/rails-3-method-put-still-supposed-to-working –@Jibaly以前的解决方案似乎不起作用,部分原因是中间件在config/environment.rb中交换会导致错误:“未定义变量” –