Fixes _rails_command
Changes precedence of the conditional clause, more recent versions come
first now. Fixes problems when users update their app and still have
the old rails files inside of their file tree.
Closes #2405 - check the discussion there for further info.
Diff
1diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh
2index 23d15a9a1f028086413b660fa3e72d661e2dc932..210fdfcf74d60f9d5151abad36b0f921f9e38422 100644
3--- a/plugins/rails/rails.plugin.zsh
4+++ b/plugins/rails/rails.plugin.zsh
5@@ -1,10 +1,10 @@
6 function _rails_command () {
7- if [ -e "script/server" ]; then
8- ruby script/$@
9+ if [ -e "bin/rails" ]; then
10+ bin/rails $@
11 elif [ -e "script/rails" ]; then
12 ruby script/rails $@
13- elif [ -e "bin/rails" ]; then
14- bin/rails $@
15+ elif [ -e "script/server" ]; then
16+ ruby script/$@
17 else
18 rails $@
19 fi