You’re looking for reflect_on_all_associations.
So in short:
Post.reflect_on_all_associations(:has_many)
…will give an array (of object with attributes like name, etc) of all has_many associations.
You’re looking for reflect_on_all_associations.
So in short:
Post.reflect_on_all_associations(:has_many)
…will give an array (of object with attributes like name, etc) of all has_many associations.