Turned jbjornson's gist (https://gist.github.com/jbjornson/1186126) into a plugin and modifed for Rail's partials (shared and same directory)