如何解决此路由错误

时间:2011-07-27 22:55:42

标签: ruby-on-rails-3

我有这条路线

resources :boards do
   member do
      get :move
      post :move_category
      get :notify
      post :notify_create
      delete :notify_destroy
   end
   resources :topics
  end

问题在于:notify_destroy路由报告为

notify_destroy_board DELETE /boards/:id/notify_destroy(.:format) {:action=>"notify_destroy", :controller=>"boards"}


link_to "Remove Notification",notify_destroy_board_path(board),:method=>:delete, :confirm=>true 

导致此错误:No route matches "/boards/2/notify_destroy"这似乎是佣金路线报告的确切路线。

我确信我错过了一些简单但我无法看到的地方。有什么建议吗?

修改

感谢Zabba,问题解决了。它将MochiKit JS库包含在导致Javascript问题的应用程序中。

有趣的是,如果我将链接放在<%= javascript_include_tag上方的MochiKit文件中:defaults%>标签,问题也消失了。我想我需要详细了解原因。

0 个答案:

没有答案