専用のadmin/countries_controllerは、レコード作成以外のすべてのアクション(index、...)に対して正しく使用されています。ここでは、親コントローラディレクトリから定期countries_controllerはアクティブです:ルーティングレール管理コントローラ作成アクション
Started POST "/countries" for 127.0.0.1 at 2011-06-29 23:26:38 +0200
Processing by CountriesController#create as HTML
管理者/国にルーティングされているPOSTの作用を有することが欠けていますか?
routes.rbを:
resources :countries
namespace :admin do
resources :countries
end
すくい路線:ここに未回答
countries GET /countries(.:format) {:action=>"index", :controller=>"countries"}
POST /countries(.:format) {:action=>"create", :controller=>"countries"}
new_country GET /countries/new(.:format) {:action=>"new", :controller=>"countries"}
admin_countries GET /admin/countries(.:format) {:action=>"index", :controller=>"admin/countries"}
POST /admin/countries(.:format) {:action=>"create", :controller=>"admin/countries"}
new_admin_country GET /admin/countries/new(.:format) {:action=>"new", :controller=>"admin/countries"}
同様の質問:あまりにも名前空間べき Rails help with building Admin area - Routing problem
あなたのビューでPOSTリクエストを開始するURLをどのように構築していますか? – drummondj
'<%= link_to 'New country'、new_admin_country_path%>'は、<%= form_for(@country)do | f |を含む標準的な足場フォームヘルパーにつながります。 %> 'と' <%= f.submit%> ' – David