Added a flash message to the creation of triggers
This commit is contained in:
parent
6004519546
commit
2824c1d8d7
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue