fixes :notice after project is created in projects_controller #2023

Merged
merged 1 commit into from Nov 21, 2012
Jump to file or symbol
Failed to load files and symbols.
+3 −2
Split
@@ -21,9 +21,10 @@ def create
@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
@@ -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}";