Depends_on polymorphic association

Hello everyone,

So I wrote this little piece of code:

http://blog.stonean.com/2008/05/dependson.html

Sorry for the blog link, but this was necessary for code formatting and
long
description.

Anyway, I just wanted to know if something like this already exists? If
not, I would love feedback on how to make it better.

thanks,
andy

Andrew S.