From b5df3bffd78e4c4c4451bc6ac9b5c15a258e47b1 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Mon, 6 Feb 2017 13:05:20 -0600 Subject: [PATCH] Updated the #create action to render the show view in case of a form error --- app/controllers/projects/variables_controller.rb | 4 ++-- 1 file 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 -- GitLab