From dbeff20aa6ef128d46483df835edd33540ce3dd6 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 5 Jul 2014 21:42:42 -0600 Subject: remove dead code and tidy up controller action. --- app/controllers/api/v1/photos_controller.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'app/controllers/api') diff --git a/app/controllers/api/v1/photos_controller.rb b/app/controllers/api/v1/photos_controller.rb index 2e4d9709..49c60f04 100644 --- a/app/controllers/api/v1/photos_controller.rb +++ b/app/controllers/api/v1/photos_controller.rb @@ -12,16 +12,7 @@ module Api end def create - cake_id = params[:cake_id] - UploadPhoto.new.run(cake_id, params) - @photo = Creation.find(cake_id).photos.last - respond_with(@photo) - end - - private - - def photo_params - params.require(:photo).permit(:image, :watermark) + respond_with(@photo = UploadPhoto.new.run(params[:cake_id], params)) end end end -- cgit v1.2.3