diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-23 13:10:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-23 13:10:51 +0000 |
commit | 8f24aa6c676b90f125adc9bf75ecc1cbdaf7a379 (patch) | |
tree | 39c10a974c438ca9b5cc52bdd0c4de544fc5fadc /app/controllers | |
parent | 3871cbc75c4ed8ad8501d77e09a740cfb0f7c7f8 (diff) | |
download | redmine-8f24aa6c676b90f125adc9bf75ecc1cbdaf7a379.tar.gz redmine-8f24aa6c676b90f125adc9bf75ecc1cbdaf7a379.zip |
Preserve uploaded files when on documents.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8944 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/documents_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 3f6c9497e..262088ed2 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -52,8 +52,8 @@ class DocumentsController < ApplicationController def create @document = @project.documents.build(params[:document]) - if request.post? and @document.save - attachments = Attachment.attach_files(@document, params[:attachments]) + @document.save_attachments(params[:attachments]) + if @document.save render_attachment_warning_if_needed(@document) flash[:notice] = l(:notice_successful_create) redirect_to :action => 'index', :project_id => @project |