Commit b5df3bff authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Updated the #create action to render the show view in case of a form error

parent 44bb70c8
...@@ -26,10 +26,10 @@ class Projects::VariablesController < Projects::ApplicationController ...@@ -26,10 +26,10 @@ class Projects::VariablesController < Projects::ApplicationController
if @variable.valid? && @project.variables << @variable if @variable.valid? && @project.variables << @variable
flash[:notice] = 'Variables were successfully updated.' flash[:notice] = 'Variables were successfully updated.'
redirect_to namespace_project_settings_ci_cd_path(project.namespace, project)
else else
flash[:alert] = @variable.errors.full_messages.join(',').html_safe render "show"
end end
redirect_to namespace_project_settings_ci_cd_path(project.namespace, project)
end end
def destroy def destroy
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment