# How to determine if child rows added?

**URL:** <https://www.ruby-forum.com/t/how-to-determine-if-child-rows-added/118617>\
**Category:** Rails\
**Created:** [October 29, 2007, 2:38pm UTC](https://www.ruby-forum.com/t/how-to-determine-if-child-rows-added/118617 "2007-10-29T14:38:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![peri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@peri](https://www.ruby-forum.com/u/peri)\
**Post date:** [October 29, 2007, 2:38pm UTC](https://www.ruby-forum.com/t/how-to-determine-if-child-rows-added/118617/1 "2007-10-29T14:38:55Z")

</div>

Hey all -  
I have an odd ball situation where I want to check the parent  
ActiveRecord object to see if the child rows have been loaded already  
or not. I’m sure the answer is probably staring me right in the  
face… but it’s Monday and my brain isn’t firing all of it’s pistons  
yet!

Thanks

---

<div class="post-metadata">

**Author:** ![peri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@peri](https://www.ruby-forum.com/u/peri)\
**Post date:** [October 29, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/how-to-determine-if-child-rows-added/118617/2 "2007-10-29T14:41:50Z")

</div>

Nevermind… I just thought I’d try the obvious…and of course Ruby  
came through…

parent\_object.child\_rows.loaded?

This returns a boolean one way or the other… hope my morning  
fogginess helps someone else out!
