mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-23 17:01:13 +00:00
shorten long line of ProjectsController
git-svn-id: http://svn.redmine.org/redmine/trunk@20178 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
24feec3bb7
commit
e665b1e8b0
@ -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|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user