【发布时间】:2009-06-02 10:45:58
【问题描述】:
我在路线中有这条线:
map.resources :questions, :new => {:vote_for => :put, :vote_against => :put}, :has_many => :replies, :shallow => true
在我看来,我使用以下助手:
link_to 'OK', vote_for_question_path(@question), :method => :put link_to 'NO', vote_against_question_path(@question), :method => :put但不幸的是,正如 Rails 所说,我的代码有问题:
用于#的未定义方法`vote_for_question_path'
怎么了?
【问题讨论】:
标签: ruby-on-rails routes