Skip to content

Instantly share code, notes, and snippets.

@Ruxton
Created July 13, 2012 02:00
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 Ruxton/3102261 to your computer and use it in GitHub Desktop.
Save Ruxton/3102261 to your computer and use it in GitHub Desktop.
# rc: Rails console
alias rc="rails c"
# debugme: touch tmp/debug.txt
alias debugme="touch tmp/debug.txt"
# rgm: Generate rails migrations
function rgm() {
local fileopener file
fileopener='subl'
file=`rails g migration $@ | grep "create" | awk '{print $3}'`
# open migration in netbeans
$fileopener $file
}
# rakerealreset: Runs rake tasks: drop, create, migrate, seed
alias rakerealreset="rake db:drop rake db:create rake db:migrate rake db:seed"
# rollback: rake db:rollback db:test:prepare
alias rollback="rake db:rollback db:test:prepare"
# migrate: rake db:migrate db:test:prepare
alias migrate="rake db:migrate db:test:prepare"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment