Skip to content

Instantly share code, notes, and snippets.

@phiggins
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phiggins/9602569 to your computer and use it in GitHub Desktop.
Save phiggins/9602569 to your computer and use it in GitHub Desktop.
for i in app/models/*.rb ; do sed "s/\s\+def \(self\.\)\?\([^( ]*\).*\|\s\+scope :\([^,]*\).*/\2\3/;tx;d;:x" $i | while read j ; do echo $(grep -R $j app/ lib/ config/ | wc -l) $j ; done ; done | sort -rn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment