From: Toshi MARUYAMA Date: Sat, 24 Oct 2020 14:39:24 +0000 (+0000) Subject: shorten long line of ProjectsController X-Git-Tag: 4.2.0~639 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e665b1e8b0b2623ac6295e0970bb1846b6c5dfd2;p=redmine.git shorten long line of ProjectsController git-svn-id: http://svn.redmine.org/redmine/trunk@20178 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ade724ddd..45fbe76aa 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -108,7 +108,7 @@ class ProjectsController < ApplicationController @project.add_default_member(User.current) end respond_to do |format| - format.html { + format.html do flash[:notice] = l(:notice_successful_create) if params[:continue] attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?} @@ -116,8 +116,15 @@ class ProjectsController < ApplicationController else redirect_to settings_project_path(@project) end - } - format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) } + end + format.api do + render( + :action => 'show', + :status => :created, + :location => url_for(:controller => 'projects', + :action => 'show', :id => @project.id) + ) + end end else respond_to do |format|