title: Rails: get belongs_to class_name
body: <p>I have a base class <code>Entry</code>, with lots of different subclasses. Such as:</p>
  
  <pre><code>class Entry &lt; ActiveRecord::Base
      ...
  end
  
  class UserEntry &lt; Entry
      belongs_to :target, class_name: User
  end
  </code></pre>
  
  <p>Is there a way to retrieve the <code>class_name</code> of the <code>target</code> association of the UserEntry class? It should return <code>User</code>.</p>