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|
If you are looking at ApplicationRecord models only in a modern Rails application, you can just use
ApplicationRecord.descendants
Here you can have a look at it : http://apidock.com/rails/Class/descendants