Commit 249760e3

mo khan <mo@mokhan.ca>
2013-12-31 15:33:37
update creation when photo is deleted.
1 parent 245652a
Changed files (1)
app
app/controllers/photos_controller.rb
@@ -33,6 +33,7 @@ class PhotosController < ApplicationController
   def destroy
     @photo = @creation.photos.find(params[:id])
     if @photo.destroy
+      @creation.touch
       render :json => {files: [@photo.to_jq_upload]}.to_json
     else
       render :json => [{:error => "could not remove the photo"}], :status => 304