[LRUG] Tool to show included partials in RoR?

Matthew Rudy Jacobs matthewrudyjacobs at gmail.com
Thu Jan 21 07:09:21 PST 2010


I've built "HTML trace" plugins a couple of times.
At least in rails 2.2 there was a particular method for partial rendering
Could easily be super ed

But it was too hacky
Perhaps with 3 and the fixed api you can build a robust solution

On 21 Jan 2010 23:01, "Tom Stuart" <tom at experthuman.com> wrote:

On 21 Jan 2010, at 14:25, Jocke Selin <jocke at selincite.com> wrote: > point
at a file in the app/view...
You can't do a good job of this in general, since the argument to #render
can be an arbitrary Ruby expression (e.g. an ActiveRecord instance) rather
than just the static filename of a partial, so you won't know what partial
it's rendering without actually executing the template (and the application
it lives in).

So maybe someone out there has written a tool that greps templates for
"render :partial => '.*'" and "render '.*'" and builds a dependency tree
from that, but if that technique alone is sophisticated enough to draw the
graph you're looking for then you're luckier than me.

Cheers,
-Tom

_______________________________________________ Chat mailing list
Chat at lists.lrug.org http://lists.l...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20100121/902dc6ff/attachment-0003.html>


More information about the Chat mailing list