Add notices
All checks were successful
CI / scan_ruby (push) Successful in 16s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 12s
CI / test (push) Successful in 39s

This commit is contained in:
sto
2025-06-21 09:59:18 +02:00
parent 2616cbaa71
commit 5b908fe37c
10 changed files with 144 additions and 70 deletions

View File

@@ -24,7 +24,7 @@ class ContestantsController < ApplicationController
@contestant = Contestant.new(contestant_params)
@contestant.contest_id = @contest.id
if @contestant.save
redirect_to contest_path(@contest)
redirect_to contest_path(@contest), notice: t("contestants.new.notice")
else
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
@@ -36,7 +36,7 @@ class ContestantsController < ApplicationController
authorize @contest
if @contestant.update(contestant_params)
redirect_to @contest
redirect_to @contest, notice: t("contestants.edit.notice")
else
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
@@ -48,7 +48,7 @@ class ContestantsController < ApplicationController
authorize @contest
@contestant.destroy
redirect_to contest_path(@contest)
redirect_to contest_path(@contest), notice: t("contestants.destroy.notice")
end
def import
@@ -101,7 +101,7 @@ class ContestantsController < ApplicationController
end
end
end
redirect_to contest_path(@contest)
redirect_to contest_path(@contest), notice: t("contestants.import.notice")
else
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)