Commit 2824c1d8 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Added a flash message to the creation of triggers

parent 60045195
......@@ -8,15 +8,16 @@ class Projects::TriggersController < Projects::ApplicationController
@trigger.save
if @trigger.valid?
redirect_to namespace_project_settings_ci_cd_path(@project.namespace, @project)
flash[:notice] = "Trigger has been created successfully"
else
@triggers = project.triggers.select(&:persisted?)
render :index
end
redirect_to namespace_project_settings_ci_cd_path(@project.namespace, @project)
end
def destroy
trigger.destroy
flash[:alert] = "Trigger removed"
redirect_to namespace_project_settings_ci_cd_path(@project.namespace, @project)
end
......
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