Hi I have the main model ServiceDeskTicket and its associated models like ServiceDeskAttachment, ServiceDeskKnowledgeBase, ServiceDeskCI etc.. Now i want to convert ServiceDeskTicket to an Incident.As a part of that I have to create a new incident which has the same information as that of ServiceDeskTicket And also IncidentKnowledgeBase has the same information as that of ServiceDeskKnowledgeBase like that.. For example service_desk_knowledge_bases table has the structure id | integer | not null default nextval(''service_desk_knowledge_bases_id_seq''::regclass) service_desk_ticket_id | integer | knowledge_base_id | integer | Like incident_knowledge_bases has the structure id | integer | not null default nextval(''incident_knowledge_bases_id_seq''::regclass) incident_id | integer | knowledge_base_id | integer service_desk_tickets like id | integer | not null default nextval(''service_desk_tickets_id_seq''::regclass) number | character varying(15) | title | character varying(100) | service_desk_status_id | integer | service_desk_category_id | integer | service_desk_sub_category_id | integer | reported_by_id | integer | owner_id | integer | service_desk_impact_id | integer etc And Incident like id | integer | not null default nextval(''incidents_id_seq''::regclass) number | character varying(15) | default NULL::character varying title | character varying(100) | default NULL::character varying incident_status_id | integer | incident_category_id | integer | incident_sub_category_id | integer | reported_by_id | integer | owner_id | integer | incident_impact_id | integer etc Like the others also..I dont know how to start..What I am going to do is to create an incident like inc=Incident.new inc.number= sd_ticket.number inc.incident_category_id= sd_ticket.service_desk_category_id like that And to do same to all other models . But is this the right method Or is there any other easy method? I expect your valuable advise 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 -~----------~----~----~----~------~----~------~--~---