Rails: controllers vs models which should handle file manipulation
https://softwareengineering.stackexchange.com/questions/101853
-
02-11-2019 - |
题
This post by Jamis Buck about keeping Rails controllers skinny has always stuck with me. I have an app in which a zip file consisting of an XML file and some images is uploaded and used to create the model (mostly from the xml file, which points to the images).
Should all the code dealing with extracting the files from the zip and moving them to their appropriate place go in the controller or the model?
thanks!
没有正确的解决方案