I have this route
resources :boards do
member do
get :move
post :move_category
get :notify
post :notify_create
delete :notify_destro开发者_如何学编程y
end
resources :topics
end
The problem is with :notify_destroy
The route reports as
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
results in this error: No route matches "/boards/2/notify_destroy"
which seems to be the exact route that rake routes report.
I am sure I am missing something simple but I can't see where it is. Any suggestions?
EDIT
Thanks to Zabba,the issue is solved. It was including MochiKit JS library into my app that was causing the Javascript issue.
Interestingly, if I put the links to the MochiKit file above the <%= javascript_include_tag :defaults %> tag, the problem also disappears. I guess I need to read up more on why this is.
精彩评论