Skip to content

Instantly share code, notes, and snippets.

@SamuraiT
Last active August 29, 2015 14:23
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 SamuraiT/5c826889b8d800978c50 to your computer and use it in GitHub Desktop.
Save SamuraiT/5c826889b8d800978c50 to your computer and use it in GitHub Desktop.
show-routes
show_routes() {
#TODO ADD Usage
# remove {:id=>/\d+/}
if [ -z "$1" ]; then
bundle exec rake routes | sed -n 's/ */ | /gp'
else
bundle exec rake routes | grep $1 | sed -n 's/ */ | /gp'
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment