]> source.dussan.org Git - redmine.git/commitdiff
Preserve uploaded files when on news.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 23 Feb 2012 13:08:32 +0000 (13:08 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 23 Feb 2012 13:08:32 +0000 (13:08 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8943 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/news_controller.rb

index 9d55f08b3d11626dd1a95646bd6756e024b16112..03a7ba29e79b9cac9ce16488fbd026c9452fa626 100644 (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