use "do end" instead of {} at AttachmentsController

git-svn-id: http://svn.redmine.org/redmine/trunk@20278 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2020-11-06 13:00:52 +00:00
parent 54281df132
commit 14da3c7dc4

View File

@@ -37,7 +37,7 @@ class AttachmentsController < ApplicationController
def show def show
respond_to do |format| respond_to do |format|
format.html { format.html do
if @attachment.container.respond_to?(:attachments) if @attachment.container.respond_to?(:attachments)
@attachments = @attachment.container.attachments.to_a @attachments = @attachment.container.attachments.to_a
if index = @attachments.index(@attachment) if index = @attachments.index(@attachment)
@@ -64,7 +64,7 @@ class AttachmentsController < ApplicationController
else else
render :action => 'other' render :action => 'other'
end end
} end
format.api format.api
end end
end end
@@ -113,13 +113,13 @@ class AttachmentsController < ApplicationController
respond_to do |format| respond_to do |format|
format.js format.js
format.api { format.api do
if saved if saved
render :action => 'upload', :status => :created render :action => 'upload', :status => :created
else else
render_validation_errors(@attachment) render_validation_errors(@attachment)
end end
} end
end end
end end
@@ -155,13 +155,13 @@ class AttachmentsController < ApplicationController
saved = @attachment.save saved = @attachment.save
respond_to do |format| respond_to do |format|
format.api { format.api do
if saved if saved
render_api_ok render_api_ok
else else
render_validation_errors(@attachment) render_validation_errors(@attachment)
end end
} end
end end
end end