mattyoho / Refactazor forked from ehrenmurdick/Refactazor

Script to help refactor rails projects

This URL has Read+Write access

name age message
file README.textile Loading commit data...
file refactor
README.textile

USAGE


ORIG=template NEW=category refactor

To rename Template to Category, for example.
After you’ve made the code changes, you can get the body of a migration
(if you renamed a model for example) by choosing ‘m’

This will dump out the body of a migration which should help take care of your table and column names affected.

Disclaimer

Do this in a new branch or something, whatever you do don’t use it on a project which is not in version
control. You will probably regret it if you can’t undo anything.

As of yet, it’s buggy and inconsistent

This script is to reduce the typing involved in such a refactor. It is not supposed to think for you.
There will be more work for you to do after you’ve successfuly run it, this is just to speed the
process up a bit.

I have, however, used this script to rename a model appearing in hundreds of files in a large app
in a relatively short amount of time.