Eager loading all Rails classes before valid class fetching
Refactor class fetching to catch polymorphic foreign keys