Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Map out your Rails Partials in a tree view
Ruby
tree: 3102bcd34c

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
MIT-LICENSE
README.md
Rakefile
init.rb
install.rb
uninstall.rb

README.md

PartialMap

Too many partials in your project? Can't figure out if the hip bone connects to the thighbone or the cheekbone? Let PartialMap help :)

rails 3

script/rails plugin install git@github.com:skwp/PartialMap.git

rails 2

script/plugin install git@github.com:skwp/PartialMap.git

Usage

rake partialmap:text
rake partialmap:html > ~/partials.html | open ~/partials.html

Example Output:

Here's what a very small partial tree might look like. This was obtained by running rake partialmap:text

foo/show.html.erb
|---foo/_foo_name_header.html.erb
|---foo/_bar_quux_list.html.erb
|------foo/_quux_group.rhtml
|---foo/_bazs.rhtml
|------foo/_baz_line.rhtml
|---------------foobars/_select_foobar.rhtml
|------------------foobars/_foobar_subpartial.rhtml

Contributing

Please feel free to fork and contribute to the project. The mapping algorithm could be improved, the formatters can be made prettier and more useful. Enjoy!

Not tested with haml, but should theoretically work.

Copyright (c) 2011 Yan Pritzker, yanpritzker.com, released under the MIT license

Something went wrong with that request. Please try again.