I could copy all images for the product and create new rows in the
product_images table (the one used by attachment_fu) but this seems a
bit inelegant, does anybody know a 'better' way or if attachment_fu
supports this functionality in some way ?
Nope, it doesn't support that. But if it did, it'd probably create
new rows in your attachment table and copy over the attachments to the
new copied records.
You should probably send 'img' to #temp_path. Those are TempFile
objects, and they will automatically be deleted when they're garbage
collected. So, you'll lose the reference to them by passing img.path,
and there's a chance the file won't be there when you go to save it.
If you pass the TempFile instance, it won't get garbage collected
until after the rails request has completed.