# Validates\_associated is unnecessary?

**URL:** <https://www.ruby-forum.com/t/validates-associated-is-unnecessary/169180>\
**Category:** Rails\
**Created:** [May 30, 2009, 10:08pm UTC](https://www.ruby-forum.com/t/validates-associated-is-unnecessary/169180 "2009-05-30T22:08:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [May 30, 2009, 10:08pm UTC](https://www.ruby-forum.com/t/validates-associated-is-unnecessary/169180/1 "2009-05-30T22:08:33Z")

</div>

Hi,

I have a strange problem. Using accepts\_nested\_attributes\_for, if I add  
on top of that the validates\_associated declaration, AR makes 1 SQL  
query based on the parent\_id (I use acts\_as\_list and acts\_as\_tree) for  
each associated child POSTed.

When I remove the validates\_associated declaration, the sql queries  
disappear and in fact if the associated models are not valid, then the  
parent model won’t be valid either, as if the validates\_associated was  
useless for me.

Is there something that I am not getting here? I find it very strange.

Thanks in advance to whoever can shed light on this.
