aeolusproject/conductor — pull request #6 by jeckersb (2012-08-13 16:13:14+00:00)
Title: Fix MetadataObject.lookup to handle lazy-loaded classes (BZ#847373)

https://bugzilla.redhat.com/show_bug.cgi?id=847373

Under the circumstances in the above bug (running rake
dc:create_user), the Pool class (and others) have not been loaded yet
when running MetadataObject.lookup. Because of this, Pool is not
listed in ActiveRecord::Base.subclasses, and 'klass' ends up being
nil. When using const_get instead to obtain a handle to the desired
object class, the const_missing code paths run and Pool gets lazy
loaded.