title: ActiveRecord won't build the right class using STI
body: <p>I'm using single table inheritance in my application and running into problems building inherited users from an ancestor. For instance, with the following setup:   </p>
  
  <pre><code>class School &lt; ActiveRecord::Base
  
    has_many :users
  
  end
  
  class User &lt; ActiveRecord::Base
  
  
    attr_accessible :type #etc...
  
    belongs_to :school
  
  end
  
  Class Instructor &lt; User
  
     attr_accessible :terms_of_service
     validates :terms_of_service, :acceptance =&gt; true
  
  end
  
  
  Class Student &lt; User
  
  end
  </code></pre>
  
  <p>How can I build either a <code>instructor</code> or <code>student</code> record from an instance of <strong>School</strong>? Attempting something like <code>School.first.instructors.build(....)</code> gives me a new <strong>User</strong> instance only and I won't have access to instructor specific fields such as <code>terms_of_service</code> causing errors later down the rode when generating instructor-specific forms, building from console will give me an mass-assignment error (as it's trying to create a <strong>User</strong> record rather than an <strong>Instructor</strong> record as specified). I gave the example of <strong>School</strong>, but there are a few other associations that I would like to inherit from the User table so I don't have to repeat code or fields in the database. Am I having this problem because associations can not be shared in an STI setup?</p>