I’m using the “uuidtools” package to generate (hopefully) unique values
IDs within a partial (for products being added to an order form, where
nothing is saved to the DB until the end).
Unfortunately when I add a new product line (using RJS page.insert.html
rendering a partial) the new lines added all have the same UUID.
Here’s the code from the (top of the) partial -
If we have a new product added then we generate a UUID. If it is in
mode, and we have an existing database record we using the ID of the
as the ID.
When I generate the page initially it puts one product line in place.
a UUID value. When I click my link to add a new line, it has a
UUID : but adding any further rows still use this second value.
Is there some sort of caching going on ? Or is there some other reason