Is there a Sublime Text 2 package that can find the call to render of a Rails view partial?

Sometimes I'll open up a partial view file in my Rails project using Sublime Text 2 and want to know where its call(s) to render come from (usually to debug my way through views that call partials that call partials...). Is there a package that enables you to find a list of calling files (or just directly open the calling file if there's only one), in the same vein as the "Switch between code and test" hotkey in Sublime Text 2 Ruby Tests?


Your rails log is probably your best bet. When you're trying to figure out which code called what, your rails log will say something like Processing SomeController#some_action ..., which tells you which action was processed.

After that it will also say things like, Rendering template... with the name of the template.

I guess what I'm saying is that I don't think there's a plugin that will work other than simply using a find with regex that finds all instances of render, but even it's going to probably miss which partials are included, etc.

I would debug from what the log says that rails is actually doing - that's going to be the only sure-fire source of truth, I think, and it will always include enough information to find out the answer to, "What just happened?"

You could also search the folder tree for calls to that render partial. Use ctrl+shift+f (cmd+shift+f) and choose the folder tree that you want, and then you can search via regex or text. You can then search for the partial you are looking for. This won't find you the tree, so you have to keep searching for calls to the partials it's rendered in (if you have nested partials), but it's quite thorough

Need Your Help

ClientDataSet filter with “NOT LIKE”

delphi filter tclientdataset

When using the Filter property of the ClientDataSet with filter

Detect a compressed file java

java stream inputstream compression

Hi everybody who is kind enough to read this.