Improve redirections after puzzles/messages controllers
Some checks failed
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 14s
CI / lint (push) Successful in 14s
CI / test (push) Failing after 34s

This commit is contained in:
sto
2025-11-18 09:33:42 +01:00
parent 0f725e2eef
commit bc96b16bcb
2 changed files with 4 additions and 4 deletions

View File

@@ -91,7 +91,7 @@ class MessagesController < ApplicationController
@message = Message.find(params[:id])
@message.destroy
redirect_to contest_path(@contest), notice: t("messages.destroy.notice")
redirect_to contest_messages_path(@contest), notice: t("messages.destroy.notice")
end
private

View File

@@ -25,7 +25,7 @@ class PuzzlesController < ApplicationController
@puzzle = Puzzle.new(puzzle_params)
@puzzle.contest_id = @contest.id
if @puzzle.save
redirect_to contest_path(@contest), notice: t("puzzles.new.notice")
redirect_to contest_puzzles_path(@contest), notice: t("puzzles.new.notice")
else
render :new, status: :unprocessable_entity
end
@@ -35,7 +35,7 @@ class PuzzlesController < ApplicationController
authorize @contest
if @puzzle.update(puzzle_params)
redirect_to @contest, notice: t("puzzles.edit.notice")
redirect_to contest_puzzles_path(@contest), notice: t("puzzles.edit.notice")
else
render :edit, status: :unprocessable_entity
end
@@ -45,7 +45,7 @@ class PuzzlesController < ApplicationController
authorize @contest
@puzzle.destroy
redirect_to contest_path(@contest), notice: t("puzzles.destroy.notice")
redirect_to contest_puzzles_path(@contest), notice: t("puzzles.destroy.notice")
end
private