# Refactoring support

**URL:** <https://www.ruby-forum.com/t/refactoring-support/150154>\
**Category:** Rails\
**Created:** [October 4, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/refactoring-support/150154 "2008-10-04T20:29:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Post date:** [October 4, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/refactoring-support/150154/1 "2008-10-04T20:29:52Z")

</div>

Hi,

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.

---

<div class="post-metadata">

**Author:** ![Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Post date:** [October 4, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/refactoring-support/150154/2 "2008-10-04T22:24:12Z")

</div>

Seyit Caglar Abbasoglu wrote:

> 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:

> **[O'Reilly Media - Technology and Business Training](https://www.oreilly.com)**
>
> Gain technology and business knowledge and hone your skills with learning resources created and curated by O'Reilly's experts: live online training, video, books, our platform has content from 200+ of the world's best publishers.

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…

–  
Phlip

---

<div class="post-metadata">

**Author:** ![Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Post date:** [October 6, 2008, 9:03am UTC](https://www.ruby-forum.com/t/refactoring-support/150154/3 "2008-10-06T09:03:17Z")

</div>

Thx Philip,

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

2008/10/4 Phlip [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
