I am trying to generate a controller with all the RESTful actions stubbed. I had read at Wikibooks - Ruby on Rails that all I needed to do was to call the generator with the co
One solution is to create a script that accepts one parameter, the controller name, and let the script type the whole command for you.
die () {
echo "Please supply new rails controller name to generate."
echo >&2 "$@"
exit 1
}
[ "$#" -eq 1 ] || die "1 argument required, $# provided"
rails g controller "$1" new create update edit destroy show index