Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-02-06 22:05:20 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2017-02-06 23:51:19 +0300
commitb5df3bffd78e4c4c4451bc6ac9b5c15a258e47b1 (patch)
tree1319e39e53dc48ee8c4c211a9bb911814290e856
parent44bb70c8c95fbee97661302e1279ed2c83f5d2e0 (diff)
Updated the #create action to render the show view in case of a form error
-rw-r--r--app/controllers/projects/variables_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb
index 2ebd8ccee70..a4d1b1ee69b 100644
--- a/app/controllers/projects/variables_controller.rb
+++ b/app/controllers/projects/variables_controller.rb
@@ -26,10 +26,10 @@ class Projects::VariablesController < Projects::ApplicationController
if @variable.valid? && @project.variables << @variable
flash[:notice] = 'Variables were successfully updated.'
+ redirect_to namespace_project_settings_ci_cd_path(project.namespace, project)
else
- flash[:alert] = @variable.errors.full_messages.join(',').html_safe
+ render "show"
end
- redirect_to namespace_project_settings_ci_cd_path(project.namespace, project)
end
def destroy