Finne Jager wrote in post #968154:
>> OK, you're really close.  However, think about that route. It needs
>> an :incident_id and you haven't given one.  For the create, you'll
>> want to do incident_timesheet_path(incident)
>
> Thank you, I realized that as well and put the (incident) parameter:
> <td><%= link_to 'View Time Sheet', incident_timesheet_path(incident)
> %></td>
>
> When I click on the View Timesheet link in the Index, I get:
> ----
> undefined method `edit_timesheet_path'
> ----
>
> Which has to do with this line in timesheets/show.html.erb:
> <%= link_to 'Edit', edit_timesheet_path %>
>
> Am I referencing this edit path correctly?

Instead of asking us, look at your rake routes output again!  That's why 
it's there.

>
> As per your advice I will go ahead and read the whole Routing
> documentation from front to back again because I think this will keep
> coming up as I adjust the rest of the code I already had.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to