我不斷收到這些錯誤對於沒有路由的行動 '編輯'沒有路由匹配{:控制器=> 「神器」,:動作=> 「編輯」}
控制器匹配:
def remove_artifact_from_collection
... do my stuff ..
render(:action=>:show)
end
視圖:線在其上的錯誤
<p><%= link_to 'Edit Evidence Item', edit_artifact_path, :class => 'edit_button' %></p>
路線:
resources :artifacts do
collection do
get 'remove_artifact_from_collection'
end
end
束EXEC耙路線
remove_artifact_from_collection_artifacts GET /artifacts/remove_artifact_from_collection(.:format) {:controller=>"artifacts", :action=>"remove_artifact_from_collection"}
artifacts GET /artifacts(.:format) {:controller=>"artifacts", :action=>"index"}
POST /artifacts(.:format) {:controller=>"artifacts", :action=>"create"}
new_artifact GET /artifacts/new(.:format) {:controller=>"artifacts", :action=>"new"}
edit_artifact GET /artifacts/:id/edit(.:format) {:controller=>"artifacts", :action=>"edit"}
artifact GET /artifacts/:id(.:format) {:controller=>"artifacts", :action=>"show"}
PUT /artifacts/:id(.:format) {:controller=>"artifacts", :action=>"update"}
DELETE /artifacts/:id(.:format) {:controller=>"artifacts", :action=>"destroy"}
你的耙路線顯示什麼? – DickieBoy