我有以下途徑:的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中交換會導致錯誤:「未定義變量」 –