Move VersionsController#download to AttachmentsController.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1685 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-07-22 17:20:02 +00:00
parent aaca2c50e5
commit 8a7bfc72b2
6 changed files with 28 additions and 24 deletions
-9
View File
@@ -37,15 +37,6 @@ class VersionsController < ApplicationController
flash[:error] = "Unable to delete version"
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
end
def download
@attachment = @version.attachments.find(params[:attachment_id])
@attachment.increment_download
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
:type => @attachment.content_type
rescue
render_404
end
def destroy_file
@version.attachments.find(params[:attachment_id]).destroy