I’m pretty new to RoR but I like it very much. My problem I haven’t find any refactoring support (for example renaming a controller, or extracting one).
Are there any plugins/tools for such a job? Or are there any work on that issue. IMO for agile development ease in change would be pretty nice.
I'm pretty new to RoR but I like it very much. My problem I haven't find any refactoring support (for example renaming a controller, or extracting one).
Are there any plugins/tools for such a job? Or are there any work on that issue. IMO for agile development ease in change would be pretty nice.
That would be editor-specific. Refactoring support for Ruby sucks, but it doesn't have to:
I typically...
- Baseline everything by integrating it
- svn mv a file by name
- svn mv the test file
- immediately open an editor and global search-n-replace the name
- run all the tests & integrate
The search-and-replace should hit the matching test case, by name.
I use 'svn mv' first because I'm too paranoid to do the search-n-replace first. There might be a technical reason...
That’s pretty similar to what I do. But again might there be (or is it possible to build) some scripts to do certain refactoring tasks specific to Rails.
For example "script/refactor rename_controller product_controller, admin
or “script/refactor extract_controller product_controller, admin, login:action, new:action” etc…
I’m too new to Rails (even Ruby) to create such things. And I can’t even imagine if it’s possible