EmmanuelOga
2009-Aug-28 16:36 UTC
TINY PATCH: ActiveRecord::Base.subclasses is not publicly accessible
"subclasses" class method is not accessible on ActiveRecord::Base class, but it is on other classes like ActionController::Base. Knowing the subclasses of AR::Base is pretty useful for every day usage. Currently, I have to resort to the "send hack" to access this information (not considering scanning the ObjectSpace an option). ActiveRecord::Base.subclasses returns a new Array each time it is called, so should not be possible to affect AR sane behavior by manipulating the array returned. Patch is attached to the ticket: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3115-activerecordbasesubclasses-is-not-publicly-accessible