diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-02-06 22:05:20 +0300 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-02-06 23:51:19 +0300 |
commit | b5df3bffd78e4c4c4451bc6ac9b5c15a258e47b1 (patch) | |
tree | 1319e39e53dc48ee8c4c211a9bb911814290e856 /app/controllers/projects/variables_controller.rb | |
parent | 44bb70c8c95fbee97661302e1279ed2c83f5d2e0 (diff) |
Updated the #create action to render the show view in case of a form error
Diffstat (limited to 'app/controllers/projects/variables_controller.rb')
-rw-r--r-- | app/controllers/projects/variables_controller.rb | 4 |
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 |