# To get the id value from parent table to child table

**URL:** <https://www.ruby-forum.com/t/to-get-the-id-value-from-parent-table-to-child-table/155111>\
**Category:** Rails\
**Created:** [December 8, 2008, 9:14am UTC](https://www.ruby-forum.com/t/to-get-the-id-value-from-parent-table-to-child-table/155111 "2008-12-08T09:14:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbalaji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19b73/32.png) [@rbalaji](https://www.ruby-forum.com/u/rbalaji)\
**Post date:** [December 8, 2008, 9:14am UTC](https://www.ruby-forum.com/t/to-get-the-id-value-from-parent-table-to-child-table/155111/1 "2008-12-08T09:14:50Z")

</div>

Hi  
Im using 5 tables and one parent table and 4 child tables

To get the id value from parent table to child table.To store the values  
in  
databases and display the bugs

parent table id is compare to child table is resortid  
code  
using save page  
…  
@resort\_contact.resortid=@resort\_basic.id  
child table id=parent table id

To give any idea and any link  
Thanks
