How to make a deep copy of ActiveRecord

I wanna make a method that can deep copy an ActiveRecord to a new one,
but it seems a little difficult , how to do it?

Marshal::load(Marshal::dump(object))

Gustav Paul

I think the question's more about creating a new record that has all of
the relationships?

All the Marshal trick does is create an identical copy.