How to pack models, controllers into a Plugin

We have been using rails to build a application platform for years.
Because some of projects are completely different, we have to branch
our trunk and make changes in branch.
But among trunk and branches, they do have similar models and
controllers, the platform core.
So, we are thinking about extracting these core into a plugin, which
may contains models, controllers and maybe views (but I would like to
put views in specific project's /app/views, because of the layout are
in project).
And if needed, we could override models or controllers by creating a
same class in /app/models or /app/controllers.

Most of the article in Google are talking about how to extend model in
plugin. Is that a good idea to pack part of your project into a
plugin??

Right now, I have problem like loading order, inherence issue. Has
anyone done works like these?

It makes a lot of sense to me. Easier to share among projects, and you can manage versioning of the plugin independently of the projects. I've already started to move the pieces I know I'll be reusing into plugins.

For refc material, I found The Rails Way useful, but the peepcode PDF was much more detailed, so get that for sure. Then download a few of the well known plugins to compare as examples too.

https://peepcode.com/products/rails-2-plugin-patterns

-- gw