开发者

Reuse models in multiple Rails applications

I have built a web application. This application is very speci开发者_如何学运维alized for just one task. In a new project, I'd like to reuse some database, model and controller I developed for the previous application. I don't need al the logic just some section.

I don't want to cut and past pieces of models and controllers.

Which is the best approach/strategy to accomplish this task ?

Do I have to create a plugin ?


Yes, you can reuse some of your models and controllers via Rails Engines. Check out this Railscasts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜