Forum: Ruby on Rails [ANN] Controller to View and Back Again (TextMate shortcut)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 Duane Johnson (Guest)
on 2006-02-18 08:07
(Received via mailing list)
One of the most inconvenient things about the Rails directory
structure is the relative distance between the controller and its
corresponding view files. While itâ??s organizationally sound, itâ??s
often a pain to go hunting for a view (especially in a complicated
application that has modules and modules within modules).

I discovered a fantastic little key-combo within TextMate the other
day that almost did what I wantedâ??if you hit command-option-down, you
will be taken from the controller to the corresponding functional
test (or from a model to the corresponding unit test). Try it out,
itâ??s really cool.

But what I wanted was ease of navigation from my controllers to my
views and vice versa. From what I could tell, thatâ??s not a built-in
feature of the Rails TextMate command bundles. So I wrote one and
bound it to command-option-up.  From within a controller's action, I
hit the key combination and it takes me to the view .rhtml file.
 From within the view file it takes me back to the controller.
Swift, easy, precise.

See my full post for download, installation and usage instructions.

Duane Johnson
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 Justin Forder (Guest)
on 2006-02-18 16:25
(Received via mailing list)
Duane Johnson wrote:

> really cool.
Great minds...

Kyle Shank of RadRails posted the same thought recently:

Sounds good! (as does flipping between code and tests)

D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 Duane Johnson (Guest)
on 2006-02-18 18:50
(Received via mailing list)
On Feb 18, 2006, at 8:23 AM, Justin Forder wrote:

>> corresponding functional test (or from a model to the
>> again-in-textmate/
Thanks, Justin.  I updated the post to point RadRails users in that
direction.  Looks good!

Duane Johnson
4bd34a2216dc8bdbf1f017f64e4d59e8?d=identicon&s=25 Kyle Maxwell (Guest)
on 2006-02-19 02:21
(Received via mailing list)
How about making a script to get you to a partial and back?

This topic is locked and can not be replied to.