Skip to content

Instantly share code, notes, and snippets.

@terrcin
Created August 16, 2010 03:51
Show Gist options
  • Save terrcin/526366 to your computer and use it in GitHub Desktop.
Save terrcin/526366 to your computer and use it in GitHub Desktop.
# allows the 'sc' commands to work for both Rails 2.x and Rails 3
# not mine, found it somewhere online but can't remember where
function sc {
if [ -e script/rails ]; then
script/rails console $@
else
script/console $@
fi
}
function sg {
if [ -e script/rails ]; then
script/rails generate $@
else
script/generate $@
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment