Skip to content

Commit

Permalink
Fixed rr to work with Rails 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Werth committed Dec 4, 2010
1 parent 245c200 commit 2930490
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions bin/rr/rr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,34 @@ alias rrshowcommands="echo -e '${COLOR_LIGHT_PURPLE}Available commands:
${COLOR_BLUE}rr${COLOR_NC}migrate${COLOR_BLUE}up
'"

alias rrserver='./script/server'
alias rrserverproduction='./script/server -e production'
alias rrgenerate='./script/generate'
alias rrconsole='./script/console'
rrserver(){
if [ -f ./script/server ]; then
./script/server $@ # Rails < 3
else
rails server $@ # Rails 3
fi
}
rrserverproduction(){
if [ -f ./script/server ]; then
./script/server -e production $@
else
rails server -e production $@
fi
}
rrconsole(){
if [ -f ./script/server ]; then
./script/console $@
else
rails console $@
fi
}
rrgenerate(){
if [ -f ./script/server ]; then
./script/generate $@
else
rails generate $@
fi
}

alias rrrakelist='rake -T | g ":"'
alias rrrakefind='rake -T | g '
Expand Down

0 comments on commit 2930490

Please sign in to comment.