I have a situation where I want to duplicate an ActiveRecord including duplication of has_many relationships. I''ve seen a few plugins but it seems unclear if they will work on Rails3. So I was wondering if anyone has a good suggestion for a plugin they are currently using to do this? Basically I''m doing this because I have an object that I want to allow my users to edit. I want to keep a history of the object though. So I am thinking of duplicating the object and assigning it it''s own id. The duplicated object will essentially be the ''history'' so that the user could go back and see different versions. In order to do this I need to create duplicate copies of all the underlying has_many relationships (which may change) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
pipplo, Take a look at acts_as_audited. It is very simple to use and keeps a complete history of the ActiveRecord models you want to keep track of. https://github.com/collectiveidea/acts_as_audited There are other versionion tools, but I am not familiar with any: http://ruby-toolbox.com/categories/activerecord_versioning.html -- Ylan. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/7WbayC-6h6QJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.