Elegant way to structure models into subfolders without creating submodules

前端 未结 10 543
一整个雨季
一整个雨季 2020-12-04 08:24

I have numerous models in my app/models folder. I\'d like to clean this folder up a little bit. Move models that belong to each other in subfolders. The problem is that by c

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 09:14

    Maybe you could look upon RailsEngines. It's not exactly what you need, but could gave you some ideas.

    Other than that, if your script seems to work fine (you could also just read all the files on each subfolder on model and require them), I don't see any problem against it.

提交回复
热议问题