You can shorten this to 

<pre>
object.classify.constantize.lookup_ancestors.last
</pre>