Ruby On Rails Paths
- by dweebsonduty
I am having trouble with paths in ruby on rails
My Routes:
map.resources :companies do |company|
company.resources :customers do |customer|
customer.resources :jobs
end
end
Currently I am creating the paths by hand:
<td><%= link_to 'Show', "/companies/#{params[:company_id]}/users/#{user.id}" %></td>
<td><%= link_to 'Edit', "/companies/#{params[:company_id]}/users/#{user.id}/edit" %></td>
For some reason I cant figure out how to get new_company_user to work I keep getting errors.
The routes are all there I just need help with dynamically creating them by using the API