title: Rails: Getting rid of generic "X is invalid" validation errors
body: <p>I have a sign-up form that has nested associations/attributes whatever you want to call them.</p>
  
  <p>My Hierarchy is this:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    acts_as_authentic
    belongs_to :user_role, :polymorphic =&gt; true
  end
  
  class Customer &lt; ActiveRecord::Base
    has_one :user, :as =&gt; :user_role, :dependent =&gt; :destroy
    accepts_nested_attributes_for :user, :allow_destroy =&gt; true
    validates_associated :user
  end
  
  class Employee &lt; ActiveRecord::Base
    has_one :user, :as =&gt; :user_role, :dependent =&gt; :destroy
    accepts_nested_attributes_for :user, :allow_destroy =&gt; true
    validates_associated :user
  end
  </code></pre>
  
  <p>I have some validation stuff in these classes as well. My problem is that if I try to create and Customer (or Employee etc) with a blank form I get all of the validation errors I should get plus some Generic ones like "User is invalid" and "Customer is invalid" If I iterate through the errors I get something like:</p>
  
  <pre><code>user.login can't be blank
  User is invalid
  customer.whatever is blah blah blah...etc
  customer.some_other_error etc etc
  </code></pre>
  
  <p>Since there is at least one invalid field in the nested User model, an extra "X is invalid" message is added to the list of errors. This gets confusing to my client and so I'm wondering if there is a quick way to do this instead of having to filer through the errors myself.</p>