0
您好我有一個控制器命名爲「地方」包含「視圖」一些行動,「新」,「創造」路由匹配一個控制器到另一個
當用戶進入到mysite.com/places位置我想執行所謂的「核」
所以我把這個在routes.rb中文件中的另一個控制器的作用「秀」:
map.connect '/places', :controller => "cores", :action => "show"
但它不工作。
我收到此錯誤:
Processing PlacesController#show (for 127.0.0.1 at 2010-04-16 00:52:07) [GET]
ActionController::UnknownAction (No action responded to show. Actions: admin_denied, admin_required, auto_complete_for_location, auto_complete_for_name, change_location, create, create_facebook_session, create_facebook_session_with_secret, edit, exist, facebook_params, facebook_session, facebook_session_expired, facebook_session_parameters, get_form, is_admin?, new, one_or_true, redirect_to, render_publisher_error, render_publisher_interface, render_publisher_response, set_facebook_session, top_redirect_to, update, wants_interface?, and zero_or_false):
如何映射那個動作到另一個控制器?
感謝
URL'/ places'與'/:id/show'的路由不匹配。既然你沒有通過它,你期待的ID是什麼? – 2010-04-15 23:13:40