Hello, I think you got it. Let me try it. I'll keep on touch.
Thank you very much. Best Regards, Edson > Date: Tue, 4 Jan 2011 17:30:18 +0100 > From: [email protected] > To: [email protected] > Subject: Re: [Hobo Users] Relantionship > > W dniu 04.01.2011 16:55, Edson Salomăo pisze: > > > > Hello. > > > > I´ve tried has_many/belongs_to, but what i need is to insert a record > > automatically into ticket table every time the field status of report > > table is "NOK". The status field can be 1 or 0. When it´s 0 i need > > to insert that record on the ticket table. > > > > I´m i making my self clear? > > Here is how I understand your situation: > > You have Report and Ticket models. > When someone creates new report with NOK=0 application should create a > new ticket. > Ticked should share system, status and date with report. > The ticket should have it's won description and TTR. > > I think that: > - Report has many tickets > - Ticket should belong to report > > You can create ticket automatically using callbacks[0] or you can show > user message like "This report should have a ticket create it". > > [0] http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html > > Regards, > Joachim > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" group. > 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. > -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. 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.
