I’m trying to construct a Link. The resulting Link should look something like this:
http://localhost:3000/re_goal/edit/2
This is what I came up with:
<%= @issue.re_artifact_properties.collect { |properties| link_to properties.name, re_goal_path()}.to_sentence %>
It now says that i may have ambiguous routes.
content_url has the following required parameters: ["projects", :project_id, "re_goal", :id]
But if i pass the project_id as an option, the constructed link looks something like this:
http://localhost:3000/projects/1/re_goal/1
Does any1 has an idea on how to construct the correct link?
Thanks,
Nico
Looks like you’ve got a nested route being generated there. Either supply the required params, or remove the nested route.
Or go for the ‘middle way’ of shallow routes: