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

@@ -40,7 +40,7 @@ class ContestsController < ApplicationController
@contest = Contest.new(contest_params)
@contest.user_id = current_user.id
if @contest.save
redirect_to @contest
redirect_to @contest, notice: t("contests.new.notice")
else
render :new, status: :unprocessable_entity
end
@@ -50,7 +50,7 @@ class ContestsController < ApplicationController
authorize @contest
if @contest.update(contest_params)
redirect_to @contest
redirect_to @contest, notice: t("contests.edit.notice")
else
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
@@ -60,6 +60,9 @@ class ContestsController < ApplicationController
def destroy
authorize @contest
@contest.destroy
redirect_to contests_path, notice: t("contests.destroy.notice")
end
def scoreboard