Skip to content
Snippets Groups Projects
Commit b5df3bff authored by Jose Ivan Vargas Lopez's avatar Jose Ivan Vargas Lopez
Browse files

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

parent 44bb70c8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment