Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependency graph for Rails partials

In my current Ruby on Rails view we have many views and partials. So many in fact that it's not clear which view uses which partial (which itself may use other partials as well).

The question is if there's a tool out there that generates a dependency graph of all views and partials (ideally generating a graph, but that's easy to do) or how you have solved this problem.

like image 824
ujh Avatar asked Feb 10 '09 15:02

ujh


3 Answers

I've created a plugin (basically just a rake task) that generates a graph containing all the dependencies of the views and partials for you.

Get it at http://github.com/msales/partial_dependencies/tree/master

like image 58
ujh Avatar answered Nov 14 '22 13:11

ujh


Should be relatively simple to do reading all views and partials and creating a directed graph on the fly, the only thing you need to be carefull about is loops.

like image 35
krusty.ar Avatar answered Nov 14 '22 12:11

krusty.ar


Noisy Partials could be what you need (although I've not actually tried it).

like image 41
James Mead Avatar answered Nov 14 '22 14:11

James Mead