# Single table inheritance

**URL:** <https://www.ruby-forum.com/t/single-table-inheritance/184444>\
**Category:** Rails\
**Created:** [March 2, 2010, 5:15pm UTC](https://www.ruby-forum.com/t/single-table-inheritance/184444 "2010-03-02T17:15:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shyam\_mohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c5a1d2/32.png) [@shyam\_mohan](https://www.ruby-forum.com/u/shyam_mohan)\
**Post date:** [March 2, 2010, 5:15pm UTC](https://www.ruby-forum.com/t/single-table-inheritance/184444/1 "2010-03-02T17:15:53Z")

</div>

Hi all  
plz hel me

1  
2  
3  
4  
5  
6  
7  
8

\*im using single table inheritance in thirdpartycompany model  
ThirdPartyCompany \< Company

now im creating a new thirdpartycompant using  
thirdpartycompany controller  
@third\_party\_company  
=ThirdPartyCompany.new(params[:third\_party\_company])

@third\_party\_company.save

, but data is not going to table company…can u tell me what is problem  
\*

or open this

[http://pastie.org/849982](http://pastie.org/849982)  
[http://pastie.org/849982](http://pastie.org/849982)  
Regards,  
Shyam  
+91-9716-18-9650

---

<div class="post-metadata">

**Author:** ![shyam\_mohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c5a1d2/32.png) [@shyam\_mohan](https://www.ruby-forum.com/u/shyam_mohan)\
**Post date:** [March 3, 2010, 10:07am UTC](https://www.ruby-forum.com/t/single-table-inheritance/184444/2 "2010-03-03T10:07:46Z")

</div>

shyam mohan wrote:

> \*im using single table inheritance in thirdpartycompany model  
> ThirdPartyCompany \< Company
> 
> now im creating a new thirdpartycompant using  
> thirdpartycompany controller  
> @third\_party\_company  
> =ThirdPartyCompany.new(params[:third\_party\_company])
> 
> @third\_party\_company.save
> 
> , but data is not going to table company…can u tell me what is problem  
> Change @third\_party\_company.save to @third\_party\_company.save! and see  
> what the error message says
