I have a whole bunch of child classes that inherit from a parent class via single-table-inheritance in my Rails app. I\'d like a way to get an array of all the child classes tha
You need to eager load the classes, as stated in: https://github.com/rails/rails/issues/3364
ActionDispatch::Reloader.to_prepare do Rails.application.eager_load! end
Then you will be able to use:
YourClass.subclasses
or
YourClass.descendants