Topic: I want to reuse models/controllers/migrations from my prev app, how?

I wrote an app awhile back with a comment system. It is a set of models, controllers and migrations. It wasn't designed to be used in other applications, but how do I make it so?

I'm currently Copy & Paste Programming.. looking to change that. Thanks.

Re: I want to reuse models/controllers/migrations from my prev app, how?

You could place that code in a plugin.
Here is some reading:
This one talks about the basics of plugins:
http://alexyoung.org/articles/show/40/a … ls_plugins
This one talks about adding models and controllers to your plugin:
http://weblog.techno-weenie.net/2007/1/ … on-process

You can add your migrations to your plugin and use a generator or the plugin install.rb to place them to your db:migrations directory with the appropriate number 001, 002, etc..