アクション「編集」のルートが一致しないため、これらのエラーが発生し続けます
コントローラ:
def remove_artifact_from_collection
... do my stuff ..
render(:action=>:show)
end
view: エラーが発生した行
<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
bundle exec rake ルート
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"}