Skip to content

Instantly share code, notes, and snippets.

@paulnsorensen
Forked from phiggins/gist:9602569
Created March 18, 2014 16:31
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 paulnsorensen/9623774 to your computer and use it in GitHub Desktop.
Save paulnsorensen/9623774 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