Commit 8c5b79a923770195d5c6cb73ac1451df81351910
1 parent
cc539151
Exists in
master
and in
4 other branches
Fixes :notice after project is created
When projects were created in projects_controller create.js.haml passed notice as url parameter and therefore notice was not displayed in the page after redirect to the project page
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
app/controllers/projects_controller.rb
... | ... | @@ -21,9 +21,10 @@ class ProjectsController < ProjectResourceController |
21 | 21 | @project = Project.create_by_user(params[:project], current_user) |
22 | 22 | |
23 | 23 | respond_to do |format| |
24 | + flash[:notice] = 'Project was successfully created.' if @project.saved? | |
24 | 25 | format.html do |
25 | 26 | if @project.saved? |
26 | - redirect_to(@project, notice: 'Project was successfully created.') | |
27 | + redirect_to @project | |
27 | 28 | else |
28 | 29 | render action: "new" |
29 | 30 | end | ... | ... |
app/views/projects/create.js.haml