I have a product that has many photos, so when creating a new product
the user can upload as many photos as they want. This all works fine
using nested attributes for. I want the user to be able to set one of
the photos as the default/primary photo, so i have played around with
using a radio button to decide which photo to select as the default
but i cant seem to figure out how to save this to the database because
the records dont exists yet and i have no id field to go on.
Anyone got any solutions or ideas, ive done this before successfully
but the data has always come from an existing table with data in it.