From 1587bb47ecff31f5aed1ebe8369ff810ea032888 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 28 Jun 2014 08:47:54 -0600 Subject: load up photos in a composite view. --- app/controllers/api/v1/photos_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers/api') 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) -- cgit v1.2.3