问题
I have a LineItem class that has an images column. It belongs to an Order class. When a line_item is saved, the images column is a list of comma delimited image urls.
I want is to create a collage from the urls and save it as an attachment of the line_item instance.
I'm not sure where to start, though. Any idea what my work flow should look like?
Should I even use CarrierWave? Where should the image processing happen? In the LineItem model or the uploader file provided by CarrierWave?
来源:https://stackoverflow.com/questions/16698235/how-do-i-process-attachements-programatically-from-the-model-without-using-for