programatically determine table relationships

Does anyone know how I can programatically work out relationships
between models, as defined by 'has_many', 'belongs_to' etc. after the
models have been defined?

Ben wrote:

Does anyone know how I can programatically work out relationships
between models, as defined by 'has_many', 'belongs_to' etc. after the
models have been defined?

There are at least 2 plugins that essentially do what you want:
dr_nic_magic_models (http://magicmodels.rubyforge.org/) and drysql
(http://drysql.rubyforge.org/)