2010-11-06 117 views
0
resources :users do 
    get :save_delete, :on => :member 
    get :question_form, :on => :member 
    post :question_send, :on => :member 
    resources :comments 
end 

发送和张贴到我的服务器后,我在日志中得到这个错误:的Rails 3路由

#Started POST "https://stackoverflow.com/users/1/question_send" 
#ActionController::RoutingError (No route matches "https://stackoverflow.com/users/1/question_send") 

rake routes # works fine, no errors 
+0

您很可能应该在此处使用其他资源。 – alternative 2010-11-06 11:07:25

回答

0

你很可能没有重新启动服务器。路由代码看起来很好。

但是,我同意@mathepic - 你的资源似乎很奇怪。可能有一些我们不知道的内容,但除非你对这些question_formquestion_send成员路由有真正真正的真正原因,否则你应该考虑做一些其他的(和更多的Rails-y)方法。