diff options
| author | mo khan <mo@mokhan.ca> | 2014-06-28 08:47:54 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-06-28 08:47:54 -0600 |
| commit | 1587bb47ecff31f5aed1ebe8369ff810ea032888 (patch) | |
| tree | fe52b07f9528e3aa012e9cbdd66f3da718d6df12 /app/controllers/api/v1 | |
| parent | e081f9b2c35e8227c5e99a76e6c5462490feac1a (diff) | |
load up photos in a composite view.
Diffstat (limited to 'app/controllers/api/v1')
| -rw-r--r-- | app/controllers/api/v1/photos_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/api/v1/photos_controller.rb b/app/controllers/api/v1/photos_controller.rb index 6a9d12a2..99fae4e1 100644 --- a/app/controllers/api/v1/photos_controller.rb +++ b/app/controllers/api/v1/photos_controller.rb @@ -3,6 +3,10 @@ module Api class PhotosController < ApiController respond_to :json + def index + respond_with(@photos = current_user.creations.find(params[:cake_id]).photos) + end + def create cake_id = params[:cake_id] UploadPhoto.new.run(cake_id, params) |
