Skip to content

Instantly share code, notes, and snippets.

@adamgamble
Created January 3, 2011 21:56
Show Gist options
  • Select an option

  • Save adamgamble/764042 to your computer and use it in GitHub Desktop.

Select an option

Save adamgamble/764042 to your computer and use it in GitHub Desktop.
sc () {
[[ `rails -v` =~ ([0-9]) ]]
if [[ "$BASH_REMATCH" == "3" ]]; then rails c; else script/console; fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment