# What gets called on belongs\_to child on parent.save

**URL:** <https://www.ruby-forum.com/t/what-gets-called-on-belongs-to-child-on-parent-save/147369>\
**Category:** Rails\
**Created:** [September 1, 2008, 4:45am UTC](https://www.ruby-forum.com/t/what-gets-called-on-belongs-to-child-on-parent-save/147369 "2008-09-01T04:45:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbellware](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@sbellware](https://www.ruby-forum.com/u/sbellware)\
**Post date:** [September 1, 2008, 4:45am UTC](https://www.ruby-forum.com/t/what-gets-called-on-belongs-to-child-on-parent-save/147369/1 "2008-09-01T04:45:43Z")

</div>

Hi,

I’m trying to write a spec that documents that child.save gets called  
when parent.save is called. Child has belongs\_to :parent.

What is the method that gets called on the child association on  
parent.save? Can it be mocked?

Thanks,  
Scott
