Thank you very much man, I have it working now.

T.

On Thursday, July 19, 2012 12:45:55 PM UTC+1, Matt jones wrote:
>
>
> On Jul 19, 2012, at 5:10 AM, tomkins wrote: 
>
> > Hi, 
> > 
> > I currently have a page with a table-plus of companies, each of which 
> can have many contacts. All contacts are listed on another page in another 
> table. 
> > If I delete a company the contacts don't get deleted, they are left with 
> null value for their company attribute. 
> > They are connected in my sqlite3 database, each contact row has a column 
> with companyID. 
> > How can I delete all the contacts belonging to the company when I press 
> remove company? 
>
> You're looking for the :dependent option for has_many: 
>
> http://guides.rubyonrails.org/association_basics.html#has_many-dependent 
>
> --Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/KS6I1VMplz4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to