Preserve uploaded files when on news.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8943 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-02-23 13:08:32 +00:00
parent 707ce0beef
commit 3871cbc75c
1 changed files with 0 additions and 2 deletions

View File

@ -71,7 +71,6 @@ class NewsController < ApplicationController
@news.attributes = params[:news]
@news.save_attachments(params[:attachments])
if @news.save
attachments = Attachment.attach_files(@news, params[:attachments])
render_attachment_warning_if_needed(@news)
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'news', :action => 'index', :project_id => @project
@ -86,7 +85,6 @@ class NewsController < ApplicationController
def update
@news.save_attachments(params[:attachments])
if @news.update_attributes(params[:news])
attachments = Attachment.attach_files(@news, params[:attachments])
render_attachment_warning_if_needed(@news)
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'show', :id => @news