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.
精彩评论