Shared models between two Rails apps - what is the ideal solution for Workflow?

前端 未结 6 1937
时光取名叫无心
时光取名叫无心 2020-12-12 21:18

I am currently working on a Rails 3 project that is divided up into four parts:

  • The public facing website
  • The administration website/backend
6条回答
  •  天命终不由人
    2020-12-12 21:54

    drop the models project(put models into one of other parts, i'd suggest whatever you consider "more important"), put all projects into single repository(separate project folders) and make symlinks to models/libs/apis/whatever

    your code is highly coupled together and you often need to make changes to few projects at once(like updating models and updating APIs that use them, etc)

    one nice thing about single-repo-symlink setup is that your commits will be less fragmented and will usually represent full feature implementation - easier to track bugs, read history and maintain codebase

    also when you deploy you don't need to read from many repositories - one less point of failure right there

    release process is also simpler with such model as branch will now hold the scope of all projects

    there are some drawbacks like symlinks dont work that well on windows and whatnot but for me it works perfectly

提交回复
热议问题