From: Toshi MARUYAMA Date: Sun, 8 Nov 2020 13:02:10 +0000 (+0000) Subject: use "do end" instead of {} at CustomFieldsController X-Git-Tag: 4.2.0~518 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=34567be040979fd5759b3db63979bd99879b3592;p=redmine.git use "do end" instead of {} at CustomFieldsController git-svn-id: http://svn.redmine.org/redmine/trunk@20300 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 9ff8e023e..478b0dffb 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -28,14 +28,14 @@ class CustomFieldsController < ApplicationController def index respond_to do |format| - format.html { + format.html do @custom_fields_by_type = CustomField.all.group_by {|f| f.class.name } @custom_fields_projects_count = IssueCustomField.where(is_for_all: false).joins(:projects).group(:custom_field_id).count - } - format.api { + end + format.api do @custom_fields = CustomField.all - } + end end end @@ -66,10 +66,10 @@ class CustomFieldsController < ApplicationController if @custom_field.save call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field) respond_to do |format| - format.html { + format.html do flash[:notice] = l(:notice_successful_update) redirect_back_or_default edit_custom_field_path(@custom_field) - } + end format.js { head 200 } end else