summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-21 06:25:16 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-21 06:25:16 -0800
commit9477448ac0731fc1a79f4dd9432a08e34c5a7eba (patch)
treee892cd8bd317e2f844eb503d4167627996a196ba
parent6bf656970d9e4ccb1a46c78917844de6d72aad89 (diff)
parent8c5b79a923770195d5c6cb73ac1451df81351910 (diff)
downloadgitlab-ce-9477448ac0731fc1a79f4dd9432a08e34c5a7eba.tar.gz
Merge pull request #2023 from martinsp/master
fixes :notice after project is created in projects_controller
-rw-r--r--app/controllers/projects_controller.rb3
-rw-r--r--app/views/projects/create.js.haml2
2 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 7d70852f2b1..72080070bed 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -21,9 +21,10 @@ class ProjectsController < ProjectResourceController
@project = Project.create_by_user(params[:project], current_user)
respond_to do |format|
+ flash[:notice] = 'Project was successfully created.' if @project.saved?
format.html do
if @project.saved?
- redirect_to(@project, notice: 'Project was successfully created.')
+ redirect_to @project
else
render action: "new"
end
diff --git a/app/views/projects/create.js.haml b/app/views/projects/create.js.haml
index e86845656f9..ce73fe0cf01 100644
--- a/app/views/projects/create.js.haml
+++ b/app/views/projects/create.js.haml
@@ -1,6 +1,6 @@
- if @project.saved?
:plain
- location.href = "#{project_path(@project, notice: 'Project was successfully created.')}";
+ location.href = "#{project_path(@project)}";
- else
- if @project.git_error?
location.href = "#{errors_githost_path}";