> Why the current_user part?  Just Timesheet.find(params[:id]) should do
> the trick -- after all, the ID is unique.

I read in Beginning Rails 3 that current_user makes sure that the logged 
in user can not see other people's incidents/timesheets. I have the same 
thing in the IncidentsController:
------------------------------
def index
    @incidents = current_user.incidents.all
-------------------------------


> Of course that's not working.  You haven't defined timesheet anywhere.

@timesheet = Timesheet.find(params[:id])

Seems to be not working... Does it even need to find by ID if I'm 
already using the incident_timesheet_path(incident) link?

-- 
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