Created
May 10, 2012 09:42
-
-
Save ssaunier/2652169 to your computer and use it in GitHub Desktop.
Generate a Rails controller in namespace /api/v1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
if [ $# -eq 0 ]; then | |
echo "Usage: ./generate_api_controller.sh CONTROLLER" | |
exit 1 | |
fi | |
bundle exec rails generate controller "api/v1/$1" --no_helper --no_assets | |
rm -rf app/views/api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment