nathanvda/cocoon — pull request #93 by htowens (2012-10-01 14:07:43+00:00)
Title: Ensure inserted "nested-fields" div has a unique id

I had a situation where I needed to be able to reference sections of a form inserted by Cocoon by id. If an id was added to the "nested fields" div, it resulted in invalid html when it was added, as it was not unique.

This change adds a timestamp to the end of the id of the inserted div (only if it has an id), to ensure uniqueness, and to allow the div to be referenced uniquely.