diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 51259bb5d..d848b3c37 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -124,7 +124,12 @@ class AttachmentsController < ApplicationController end respond_to do |format| - format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum,@attachment.container) } + if @project.nil? + format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum,@attachment.container) } + else + format.html { redirect_to_referer_or project_path(@project)} + end + format.js end end