Shrine

Attaching a file to multiple models

We have a process where a file is uploaded and attached to a model and if it is saved correctly, then the params are passed to a method that generates duplications of that model for different clients. This is not ideal, but the process cannot be changed at this time to share the file.

If we just try to pass the params, we get the IOError: closed stream error. So my current workaround is to do
new_model.attachment = original_model.attachment.download

Is there a better/easier way of doing this?