summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorsandish chen <sandish.chen@huawei.com>2016-10-21 02:19:33 +0000
committerRémy Coutable <remy@rymai.me>2017-01-15 01:31:25 -0500
commit81f7a7ab62edf33234e7eb10834828ecd1793cb4 (patch)
treefdae74157827ef3b4572fcba0efbb018de0368d8 /app/controllers
parent28f633a96a4b16f680dc345aa87fa7aa21c53481 (diff)
downloadgitlab-ce-81f7a7ab62edf33234e7eb10834828ecd1793cb4.tar.gz
Fix to display notice when project settings updated.
Change validity checking for UpdateService. Add return value for project update service. Return 302(redirect_to) when successfully updated. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index d5ee503c44c..56e064971c1 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -42,13 +42,13 @@ class ProjectsController < Projects::ApplicationController
end
def update
- status = ::Projects::UpdateService.new(@project, current_user, project_params).execute
+ project = ::Projects::UpdateService.new(@project, current_user, project_params).execute
# Refresh the repo in case anything changed
@repository = project.repository
respond_to do |format|
- if status
+ if project.valid?
flash[:notice] = "Project '#{@project.name}' was successfully updated."
format.html do
redirect_to(