I need to duplicate a record in Rails, then it should be rendered into a new form before of creating the record.
Everything works following this helpful answer, but I'd need to populate the record with has_many_belongs_to_many associations as well
the method dup() let me duplicate everything in the record but its associations, I've also seen there's a gem Amoeba that can do a very versatile deep cloning, but I wonder if there's a simpler solution without using a gem