How can I iterate through all of the Models in my rails app?
- by James
I would like to be able to iterate over and inspect all the models in my rails app. In pseudo-code it would look something like:
rails_env.models.each do |model|
associations = model.reflect_on_all_associations(:has_many)
... do some stuff
end
My question is how do I inspect my rails app to get a collection of the models (rails_env.models) ?