Skip to content

Instantly share code, notes, and snippets.

@dnch
Created July 15, 2011 06:04
Show Gist options
  • Save dnch/1084171 to your computer and use it in GitHub Desktop.
Save dnch/1084171 to your computer and use it in GitHub Desktop.
Grep Rails Routes
function grr {
if [[ -f ./Gemfile ]]; then
bundle exec rake routes | awk '{ print $1; }' | grep $1
else
rake routes | awk '{ print $1; }' | grep $1
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment