开发者

Reuse models in multiple Rails applications

开发者 https://www.devze.com 2023-01-09 02:40 出处:网络
I have built a web application. This application is very speci开发者_如何学运维alized for just one task.

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

精彩评论

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