eschulte / rinari

Rinari Is Not A Rails IDE (it is an Emacs minor mode for Rails)
http://rinari.rubyforge.org
GNU General Public License v3.0
413 stars 68 forks source link

namespaced views / controllers / models & rinari-find-* #40

Open krgn opened 12 years ago

krgn commented 12 years ago

In projects with a couple of namespaces using rinari-find-* does not currently seem to support jumping to the correct destination file, it just ends up offering a list of all controllers / views instead. For instance, if I have a customer namespace in app/controllers and app/views and want to jump from app/views/customer/home/index.haml to the corresponding controller, its unable to distill the correct destination controller file. Is it possible to make this work and how?

purcell commented 12 years ago

Yeah, I'm not immediately sure. The rinari-find-* functions are built on jump.el, and although I am currently the most active rinari maintainer, I haven't dug far enough into jump to see how it all fits together.

There's a corresponding jump spec in rinari.el

("app/views/\\1/\\2\\..*"                 . "app/controllers/\\1_controller.rb#\\2")

which should do the right thing, but that depends on the machinery of jump.el working correctly.

I'm sorry that I don't currently have much time to investigate this (and ultimately I'd like to replace rinari's use of jump.el with Emacs' standard find-file.el). If you beat me to it, I'm happy to incorporate any fixes you might devise.