On 25 Aug 2008, at 11:57, Sijo Kg wrote:
>
> Hi
> I have the models ServiceDesk and Problem .A servicedesk can be
> related to other service desk and problems .Similarly a problem can be
> related to other problem and servicedesks .At the first stage when
> doing service desk module I solved the servicedesk related records
> with
> the table
> service_desk_related records with fields
> id
> service_desk_id | integer |
> related_record_id | integer |
> related_record_model | character varying(80) | default
> NULL::character varying
> related_record_association_type_id | integer |
>
> For example
> 1 12 Problem 4
> 2 15 ServiceDesk 3
> So now I have problem module started..So my question
> is shud i create a table name problem_related_records as of fields
> above
> or is there any other easy solution for this
>
Seems like you''ve reinvented polymorphic associations :-)
Fred
> Thanks in advance
> Sijo
> --
> Posted via http://www.ruby-forum.com/.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---