Forum: Ruby on Rails refactoring support

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B6ac054c97196dfb15a3486135299466?d=identicon&s=25 Seyit Caglar Abbasoglu (Guest)
on 2008-10-04 20:29
(Received via mailing list)
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.
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2008-10-04 22:24
(Received via mailing list)
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:

http://www.oreillynet.com/onlamp/blog/2008/05/dyna...

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
B6ac054c97196dfb15a3486135299466?d=identicon&s=25 Seyit Caglar Abbasoglu (Guest)
on 2008-10-06 09:03
(Received via mailing list)
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 <phlip2005@gmail.com>
This topic is locked and can not be replied to.