>> On a side note, by changing the resources to nested instead of top >> level, it broke my Index page which shows a list of Incidents and their >> Timesheets. It pointed out this line of code: >> >> ---------------------------- >> <td><%= link_to 'View Time Sheet', timesheet_path(incident) %></td> >> ---------------------------- > > Right, of course. Run rake routes to see what your routes look like > now.
Ok, I ran 'rake routes' and it showed: -------------------------------- incident_timesheet POST /incidents/:incident_id/timesheet(.:format) { :action=>"create", :controller=>"timesheets"} ---------------------------------- So I changed the code in my Index view to: --------------------------------- <td><%= link_to 'View Time Sheet', incident_timesheet %></td> --------------------------------- That triggers: undefined local variable or method `incident_timesheet' -- 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.