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

@@ -23,7 +23,7 @@ class PuzzlesController < ApplicationController
@puzzle = Puzzle.new(puzzle_params)
@puzzle.contest_id = @contest.id
if @puzzle.save
redirect_to contest_path(@contest)
redirect_to contest_path(@contest), notice: t("puzzles.new.notice")
else
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
@@ -35,7 +35,7 @@ class PuzzlesController < ApplicationController
authorize @contest
if @puzzle.update(puzzle_params)
redirect_to @contest
redirect_to @contest, notice: t("puzzles.edit.notice")
else
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
@@ -47,7 +47,7 @@ class PuzzlesController < ApplicationController
authorize @contest
@puzzle.destroy
redirect_to contest_path(@contest)
redirect_to contest_path(@contest), notice: t("puzzles.destroy.notice")
end
private