init
This commit is contained in:
34
.zprezto/modules/rails/README.md
Normal file
34
.zprezto/modules/rails/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
Ruby on Rails
|
||||
=============
|
||||
|
||||
Defines [Ruby on Rails][1] aliases.
|
||||
|
||||
Aliases
|
||||
-------
|
||||
|
||||
- `ror` is short for `rails`.
|
||||
- `rorc` starts the Rails console.
|
||||
- `rordc` starts the Rails console connected to the database.
|
||||
- `rordm` migrates the database.
|
||||
- `rordM` migrates the database and recreates the test database.
|
||||
- `rordr` rolls the database schema back to the previous version.
|
||||
- `rorg` generates new code.
|
||||
- `rorl` displays the log.
|
||||
- `rorlc` truncates logs to zero bytes.
|
||||
- `rorp` installs a plugin.
|
||||
- `rorr` runs code in the application environment.
|
||||
- `rors` starts the Rails server.
|
||||
- `rorsd` starts the Rails server with the debugger.
|
||||
- `rorx` destroys newly generated code.
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
*The authors of this module should be contacted via the [issue tracker][2].*
|
||||
|
||||
- [Robby Russell](https://github.com/robbyrussell)
|
||||
- [Jake Bell](https://github.com/theunraveler)
|
||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
|
||||
[1]: http://rubyonrails.org
|
||||
[2]: https://github.com/sorin-ionescu/prezto/issues
|
35
.zprezto/modules/rails/init.zsh
Normal file
35
.zprezto/modules/rails/init.zsh
Normal file
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# Defines Ruby on Rails aliases.
|
||||
#
|
||||
# Authors:
|
||||
# Robby Russell <robby@planetargon.com>
|
||||
# Jake Bell <jake.b.bell@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'ruby'
|
||||
|
||||
# Return if requirements are not found.
|
||||
if (( ! $+commands[bundle] )); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
alias ror='bundle exec rails'
|
||||
alias rorc='bundle exec rails console'
|
||||
alias rordc='bundle exec rails dbconsole'
|
||||
alias rordm='bundle exec rake db:migrate'
|
||||
alias rordM='bundle exec rake db:migrate db:test:clone'
|
||||
alias rordr='bundle exec rake db:rollback'
|
||||
alias rorg='bundle exec rails generate'
|
||||
alias rorl='tail -f "$(ruby-app-root)/log/development.log"'
|
||||
alias rorlc='bundle exec rake log:clear'
|
||||
alias rorp='bundle exec rails plugin'
|
||||
alias rorr='bundle exec rails runner'
|
||||
alias rors='bundle exec rails server'
|
||||
alias rorsd='bundle exec rails server --debugger'
|
||||
alias rorx='bundle exec rails destroy'
|
Reference in New Issue
Block a user