title: ActiveRecord update validates model's association?
body: <p>Given the relationship:</p>
  
  <p>Library -> Books -> Category</p>
  
  <p>Let's assume that category has some validations for instance:</p>
  
  <pre><code>validates :name, presence:true
  </code></pre>
  
  <p>If I run something like this:</p>
  
  <pre><code>Library.update(hash_with_all_attributes_from_library_to_category)
  </code></pre>
  
  <p>It will return true if all the library attributes are satisfied and ignore the category's validations.</p>
  
  <p>why it happens? is there a better way to update all data except find one at time?</p>
  
  <p>EDIT</p>
  
  <p>I can't post the entire file but its a snippet</p>
  
  <pre><code>Class Question &lt;&lt; ActiveRecord::Base
  
    has_many :question_alternatives, dependent: :destroy, inverse_of: :question
    # couple of validations
    accepts_nested_attributes_for :question_alternatives, allow_destroy: true, reject_if: -&gt; (attributes) {
  attributes[:text].blank?
  </code></pre>
  
  <p>}</p>
  
  <p>And I check for the other relationships that I have the accepts_nested_attributes_for and the inverse_of</p>