From: Toshi MARUYAMA Date: Wed, 28 Oct 2020 14:42:03 +0000 (+0000) Subject: shorten long line of GroupsController X-Git-Tag: 4.2.0~600 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2d4dd6da8f8884e1a73f10cc4b81447ff8e4a30f;p=redmine.git shorten long line of GroupsController git-svn-id: http://svn.redmine.org/redmine/trunk@20217 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 2a8d59027..020931599 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -66,11 +66,14 @@ class GroupsController < ApplicationController respond_to do |format| if @group.save - format.html { + format.html do flash[:notice] = l(:notice_successful_create) redirect_to(params[:continue] ? new_group_path : groups_path) - } - format.api { render :action => 'show', :status => :created, :location => group_url(@group) } + end + format.api do + render(:action => 'show', :status => :created, + :location => group_url(@group)) + end else format.html { render :action => "new" } format.api { render_validation_errors(@group) }