From 780f4957ab7bdb1f3b7d51b3802d4c548175c8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Fri, 17 Oct 2014 15:52:07 +0200 Subject: [PATCH] NoMethodError (undefined method 'delete' for nil:NilClass) #303 --- app/controllers/dmsf_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 56d7c15f..dc5c4015 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -486,7 +486,7 @@ class DmsfController < ApplicationController unless folder.delete commit flash[:error] = folder.errors.full_messages.to_sentence end - else + elsif !commit raise FileNotFound end end @@ -501,7 +501,7 @@ class DmsfController < ApplicationController else not_deleted_files << file end - else + elsif !commit raise FileNotFound end end