ActiveRecord::Base.compute_type swallows NoMethodError

Please take a look at this ticket & associated patch:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4751-activerecordbasecompute_type-swallows-nomethoderror

Class-level errors in models autoloaded through associations are raised as an NameError (uninitialized constant), not the original NoMethodError.

Thanks, Andrew