rails3.plugin.zsh 753 B

1234567891011121314151617181920212223242526
  1. # Rails 3 aliases, backwards-compatible with Rails 2.
  2. function _rails_command () {
  3. if [ -e "script/server" ]; then
  4. ruby script/$@
  5. else
  6. ruby script/rails $@
  7. fi
  8. }
  9. alias rc='_rails_command console'
  10. alias rd='_rails_command destroy'
  11. alias rdb='_rails_command dbconsole'
  12. alias rdbm='rake db:migrate db:test:clone'
  13. alias rg='_rails_command generate'
  14. alias rgm='_rails_command generate migration'
  15. alias rp='_rails_command plugin'
  16. alias ru='_rails_command runner'
  17. alias rs='_rails_command server'
  18. alias rsd='_rails_command server --debugger'
  19. alias devlog='tail -f log/development.log'
  20. alias rdm='rake db:migrate'
  21. alias rdr='rake db:rollback'
  22. alias -g RET='RAILS_ENV=test'
  23. alias -g REP='RAILS_ENV=production'
  24. alias -g RED='RAILS_ENV=development'