mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 13:30:28 +01:00
use "do end" instead of {} at FilesController
git-svn-id: http://svn.redmine.org/redmine/trunk@20311 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -60,19 +60,19 @@ class FilesController < ApplicationController
|
|||||||
Mailer.deliver_attachments_added(attachments[:files])
|
Mailer.deliver_attachments_added(attachments[:files])
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html do
|
||||||
flash[:notice] = l(:label_file_added)
|
flash[:notice] = l(:label_file_added)
|
||||||
redirect_to project_files_path(@project)
|
redirect_to project_files_path(@project)
|
||||||
}
|
end
|
||||||
format.api { render_api_ok }
|
format.api { render_api_ok }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html do
|
||||||
flash.now[:error] = l(:label_attachment) + " " + l('activerecord.errors.messages.invalid')
|
flash.now[:error] = l(:label_attachment) + " " + l('activerecord.errors.messages.invalid')
|
||||||
new
|
new
|
||||||
render :action => 'new'
|
render :action => 'new'
|
||||||
}
|
end
|
||||||
format.api { render :status => :bad_request }
|
format.api { render :status => :bad_request }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user