I've read all the posts, blogs, peepcode about nested resources but I
can't get link_to to work. I know I'm missing something simple so I
hope another set of eyes will help out.
I have a pretty simple set up:
deliverable has_many :roles
role belongs_to :deliverable
here is what I have in routes.rb:
map.resources :deliverables, :has_many => :roles
from views/deliverables/show.html.erb I'm trying to provide a link to
add a new role with this:
<%= link_to "+ Add Role", new_role_url(@deliverable) %>
But I get this error when rendering: undefined method `new_role_url'
I can type in the url http://localhost:3000/deliverables/1/roles/new
and it works fine so I'm stumped.
Thanks in advance for the help.