Fix directories and images

This commit is contained in:
2015-03-06 11:28:11 +01:00
parent 35296aa653
commit 8ba2fa731e
15 changed files with 37 additions and 34 deletions
+2 -1
View File
@@ -75,10 +75,11 @@ module Cmtool
# DELETE /images/1.xml
def destroy
@image = Cmtool::Image.find(params[:id])
directory = @image.directory
@image.destroy
respond_to do |format|
format.html { redirect_to(cmtool.images_url) }
format.html { redirect_to([cmtool, directory || :images]) }
format.xml { head :ok }
end
end