@@ -71,7 +71,6 class NewsController < ApplicationController | |||||
71 | @news.attributes = params[:news] |
|
71 | @news.attributes = params[:news] | |
72 | @news.save_attachments(params[:attachments]) |
|
72 | @news.save_attachments(params[:attachments]) | |
73 | if @news.save |
|
73 | if @news.save | |
74 | attachments = Attachment.attach_files(@news, params[:attachments]) |
|
|||
75 | render_attachment_warning_if_needed(@news) |
|
74 | render_attachment_warning_if_needed(@news) | |
76 | flash[:notice] = l(:notice_successful_create) |
|
75 | flash[:notice] = l(:notice_successful_create) | |
77 | redirect_to :controller => 'news', :action => 'index', :project_id => @project |
|
76 | redirect_to :controller => 'news', :action => 'index', :project_id => @project | |
@@ -86,7 +85,6 class NewsController < ApplicationController | |||||
86 | def update |
|
85 | def update | |
87 | @news.save_attachments(params[:attachments]) |
|
86 | @news.save_attachments(params[:attachments]) | |
88 | if @news.update_attributes(params[:news]) |
|
87 | if @news.update_attributes(params[:news]) | |
89 | attachments = Attachment.attach_files(@news, params[:attachments]) |
|
|||
90 | render_attachment_warning_if_needed(@news) |
|
88 | render_attachment_warning_if_needed(@news) | |
91 | flash[:notice] = l(:notice_successful_update) |
|
89 | flash[:notice] = l(:notice_successful_update) | |
92 | redirect_to :action => 'show', :id => @news |
|
90 | redirect_to :action => 'show', :id => @news |
General Comments 0
You need to be logged in to leave comments.
Login now