From 1458ddf100b066e0bfb0b007fdfedb8bb1624f70 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Fri, 18 Oct 2013 07:48:01 +0200 Subject: [PATCH] Refactores function implementation --- app/controllers/attachments_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index c802aac0fe..bf9d4a8cb5 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -99,10 +99,6 @@ private end def destroy_response_url(container) - object = container - - object = [@project, container.wiki] if container.kind_of? WikiPage - - url_for(object) + url_for(container.kind_of?(WikiPage) ? [@project, container.wiki] : container) end end