[LRUG] Tool to show included partials in RoR?

Jocke Selin jocke at selincite.com
Thu Jan 21 07:21:32 PST 2010


On 21 Jan 2010, at 15:12, Pablo Brasero Moreno wrote:

> 2010/1/21 Jocke Selin <jocke at selincite.com>:
>> I'm wondering if there's some nice tool that I could point
>> at a file in the app/views/ dir on my machine and it could
>> render, ascii'ally of graphically, which files are "render
>> partial" from there on. I'd like a tree with the file names,
>> that's pretty much all I'd really need.
> 
> I'm sure I have seen this before. It was exactly what you want.
> 
> As I recall it, it worked as a Rails plugin that added something like
> <div class="/route/to/template">...</div> to every template you
> rendered. Then a JS bookmarklet on our browser allowed you to see how
> every bit of the page had been rendered by pointing with the mouse,
> showing a list like this:
> 
> /path/to/layout
> /path/to/template
> /path/to/partial1
> /path/to/partial2
> 
> But I cannot find it, or remember anything else about it. Maybe it was
> a dream? :-(

That's (http://github.com/markevans/partial_identifier)  quite clever. Sadly it's again, runtime.
And, according to Tom, I'm "lucky" enough to have most of my partials defined by strings.

I just need to know which file is included by which file. :) I have two similar pieces of templates here, but they're named a bit differently so, I'm a bit confused. Would like it just printed out.

Hacking away here... :)

Thanks guys!

/JS 


More information about the Chat mailing list