diff options
| author | mo khan <mo@mokhan.ca> | 2014-06-29 09:03:12 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-06-29 09:03:12 -0600 |
| commit | 5b338409ad12c82649c0dcc481e61b198e72c0de (patch) | |
| tree | 3866ab4709bfbc92c6653fa4c97c9ee7e5309cb1 /app/controllers/api | |
| parent | ea7d541784ecf43c8afbe604fb5ae8874d7c8ca9 (diff) | |
use backbone to display an individual photo.
Diffstat (limited to 'app/controllers/api')
| -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 99fae4e1..9d8ec55a 100644 --- a/app/controllers/api/v1/photos_controller.rb +++ b/app/controllers/api/v1/photos_controller.rb @@ -7,6 +7,10 @@ module Api respond_with(@photos = current_user.creations.find(params[:cake_id]).photos) end + def show + respond_with(@photo = current_user.creations.find(params[:cake_id]).photos.find(params[:id])) + end + def create cake_id = params[:cake_id] UploadPhoto.new.run(cake_id, params) |
