Rinari leverages the structure of Rails projects to allow immediate navigation between source files.
So for example if you are in a buffer open to foo_controller.rb,
a call to
rinari-find-model will open the foo.rb model
file. Say you are currently inside the bar method in a buffer
visiting foo_controller.rb, then calling
will take you to the test_bar method in
test/functional/foo_controller_test.rb, or calling
rinari-find-view will open app/views/foos/bar.rhtml.
All told there are currently 17 different rinari-find-* functions, which
are all bound to similar hopefully intuitive keybindings allowing you to
go anywhere from anywhere. To see the full range of rinari-find
functions along with their bindings enter a rails project, activate
rinari and call describe-bindings
\H-b. The current list is also
TAGS (jumping to method definitions)
Emacs (as all grownup text editors should) makes use of tags (for a
description of tags and their use see
http://ctags.sourceforge.net/whatis.html). In Emacs the
find-tag command is bound by default to
M-.. It is often
convenient to use a different set of TAGS for every rails project.
Rinari facilitates this by automatically updating your
tags-file-name variable whenever you enter a rails project,
through the use of the
rinari-tags-file-name variable. Just set
rianri-tags-file to the path to your tags files relative to the
root of the rails project. For example...
(setq rinari-tags-file-name "TAGS")
to create such a tags file using exuberant ctags (http://ctags.sourceforge.net/) try executing something like the following from the root of your rails project.
ctags-exuberant -a -e -f TAGS --tag-relative -R app lib vendor