look at ActiveRecord::Reflection::ClassMethods, specifically the reflect_on_all_associations() and reflections() methods
Adam
look at ActiveRecord::Reflection::ClassMethods, specifically the reflect_on_all_associations() and reflections() methods
Adam
oops, forgot to post the link
http://api.rubyonrails.org/classes/ActiveRecord/Reflection/ClassMethods.html