-
从 0 开始新增一个 engine:
rails plugin new --full rails_xxx
-
在 .gitmodules 加入配置信息,如:
git submodule git@github.com:work-design/rails_xxx.git rails_xxx
git submodule init rails_xxx
git submodule update rails_xxx
-
进入 rails_xxx, 执行 git checkout master
更新子模块(engine)
- 第一次初始化项目
git submodule update --init
- 后续更新项目
git pull
git submodule update --rebase(或--merge)
- 更新每个engine(子项目)
git submodule update --init --recursive
git submodule update --rebase --recursive
在gemfile靠后的engine的model常量会先加载;