search for: efcufjc6xast9nmay9bnah6klmebb

Displaying 1 result from an estimated 1 matches for "efcufjc6xast9nmay9bnah6klmebb".

2009 Aug 06
2
duplicate model object with associations ?
class Patient < AR::Base has_many :aaas has_many :bbbs ,:through=>:aaas end class Aaa < AR::Base has_many :bbbs end ------- i want like this @patient=Patient.find(id) @new_patient=@patient.duplicate now the @new_patient should have their own copy of patient,aaas,bbbs (new records in corresponding tables) there is one options is that we can create seperate object for each