Commit 9477448ac0731fc1a79f4dd9432a08e34c5a7eba
Exists in
master
and in
4 other branches
Merge pull request #2023 from martinsp/master
fixes :notice after project is created in projects_controller
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