Lessons learned from studying Fizzy test suite https://testdrivingrails.com/blog/fizzy-test-suite
How we architect Rails apps at 37signals: a Fizzy tour. https://www.youtube.com/watch?v=dvPXFnX60cg
【Rei on Rails】#17 Fizzy 开源看板应用 - Rails 核心团队的示范项目
我还没转正,不能留言,如果你有空可以介绍一下多租户的思路吗?谢谢!
粗看了一下,好像实现得不太灵活,下面这篇感觉更灵活,但会复杂很多:
https://jumpstartrails.com/docs/accounts
其实我之前做的大多是按 jumpstart 这种模式做,也没遇到什么问题。
Jumpstart 模式适合类似 github 这样的开放平台,用户有唯一的资料页,各个组织的项目可以转移,这样就需要有全局的 User 模型。
Basecamp 模式适合租户数据隔离的场景,例如每个租户有独立的用户资料,各个租户的内容不可以转移,这样使用租户领域的 User 更方便。
我还没想清楚哪种更优,也许取决于应用的租户隔离需求程度。
