Skip to content
Snippets Groups Projects
Commit 9477448a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #2023 from martinsp/master

fixes :notice after project is created in projects_controller
parents 6bf65697 8c5b79a9
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
- 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}";
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment