diff options
| author | mo khan <mo@mokhan.ca> | 2014-06-28 22:07:41 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-06-28 22:07:41 -0600 |
| commit | 9cf4e9d8a9420e96c4b03868237498a7c73ed518 (patch) | |
| tree | 27741df79b3b215c5794b85be859626e160ef882 /app/controllers/api | |
| parent | cff3acf182741c31891bdbb5c9ef505a2b917f5a (diff) | |
load categories in the new cake form.
Diffstat (limited to 'app/controllers/api')
| -rw-r--r-- | app/controllers/api/v1/categories_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/api/v1/categories_controller.rb b/app/controllers/api/v1/categories_controller.rb new file mode 100644 index 00000000..feab720c --- /dev/null +++ b/app/controllers/api/v1/categories_controller.rb @@ -0,0 +1,11 @@ +module Api + module V1 + class CategoriesController < ApiController + respond_to :json + + def index + respond_with(@categories = Category.all) + end + end + end +end |
