]> source.dussan.org Git - redmine.git/commitdiff
shorten long line of ProjectsController
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 24 Oct 2020 14:39:24 +0000 (14:39 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 24 Oct 2020 14:39:24 +0000 (14:39 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20178 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/projects_controller.rb

index ade724ddddc2fde5e578b8de19a70d59bdc24599..45fbe76aa834942b65da834996213d93bc33456a 100644 (file)
@@ -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|