How do I process attachements programatically, from the model, without using forms?

徘徊边缘 提交于 2019-12-25 06:59:00

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!