Converting scaffold to a plugin?

I’ve modified the standard Rails scaffold code to make it more usefull
to
me. How can I convert that scaffold to a plugin so that it is more
portable? As it is, I have to re-configure scaffold everytime a new
Rails
version is released. Not very DRY. Could someone point me to a
tutorial on
the subject?