How do I convert an existing Rails 3 Application into an Engine?

Viewed 3453

How can I convert the Forum application I've been developing into a Rails Engine, so that it may be embedded inside other applications?

What should I add, keep, or remove? Should I offer a way to integrate the models? How do I set up routes and user configuration? How do I package it into a Gem? What should I watch out for?


After reading the articles and the documentation, I managed to narrow down my questions:

  • Should I namespace the models? That is, should I keep them in my Engine's module and in the app/models/engine folder?
  • What configuration files in config should I keep around?
  • What about the public folder? In Rails 3.1, stylesheets and javascripts were moved to the app/assets folder, which solved this problem, but how do I achieve the same effect in Rails 3.0?
1 Answers
Related