Skip to content

Instantly share code, notes, and snippets.

@ipoval
Last active November 11, 2015 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipoval/184cc3c24081cabd23e1 to your computer and use it in GitHub Desktop.
Save ipoval/184cc3c24081cabd23e1 to your computer and use it in GitHub Desktop.
find_unused_partials_in_views.sh
ruby -e "
'`find ./app/views -name _*`'
.split
.map { |f| f.split('/').last[1..-1][/[^\.]+/] }
.each { |f| system( %Q(fgrep -rq #{f} ./app/views/) ) ? nil : p(f) }
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment