rails3.plugin.zsh 833 B

12345678910111213141516171819202122232425262728
  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 testlog='tail -f log/test.log'
  21. alias prodlog='tail -f log/production.log'
  22. alias rdm='rake db:migrate'
  23. alias rdr='rake db:rollback'
  24. alias -g RET='RAILS_ENV=test'
  25. alias -g REP='RAILS_ENV=production'
  26. alias -g RED='RAILS_ENV=development'