I assume that clean up doesn't happen until after destroy. Seems that
'project' should be cached before @task.destroy or is it actually safe
to use this way? I'd think this might be one of those places where
production might behave differently from development and test.
Well, this is fine as long as you don't have the :dependent => :destroy option set on the task/project relationship.
You can destroy an object and still have access to it. You just can't modify it, etc... it's gone from the DB, but you're "@task" object is still an object.
If you call @task.frozen? it will return true which may/may-not be useful to you.
Thanks, Philip, for a thorough response. Of course you're right. I see
your point with the dependent_destroy -- but task is the dependent in
the relationship so I think I'm okay.