【发布时间】:2010-07-12 14:52:23
【问题描述】:
所以..这是我的link_to
和我在控制台中的输出
Parameters: {"action"=>"archive", "controller"=>"achievables"}
为什么该操作不是“归档”? 该方法是在控制器中定义的......拼写正确和一切。
编辑: 来自 routes.rb
map.archives 'achievable/archive', :controller => 'achievables', :action => 'archive'
map.resources :achievables, :member => {:build => [:get,:post], :publish_detail => [:get,:post], :publish=>[:get,:post], :confirm_publish=>[:get,:post], :confirm_delete=>[:get,:post]}
现在,错误是
Showing app/views/layouts/build_archivable.html.erb where line #6 raised:
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
这又是一条错误的道路。 =\
【问题讨论】:
标签: ruby-on-rails