Skip to content

Instantly share code, notes, and snippets.

@stevebooks
Created May 8, 2013 21:11
Show Gist options
  • Save stevebooks/5543695 to your computer and use it in GitHub Desktop.
Save stevebooks/5543695 to your computer and use it in GitHub Desktop.
function r() {
if [[ "g|generate|c|console|s|server|db|dbconsole|new" =~ $1 ]]; then
if [ -x script/rails ]; then
script/rails $@
else
bundle exec rails $@
fi
else
if [ -x script/rake ]; then
script/rake $@
else
bundle exec rake $@
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment