Merge settings & core indexes into a single nav

This commit is contained in:
sto
2025-11-13 18:21:31 +01:00
parent 97ea17b7c2
commit cdf87e48f2
18 changed files with 32 additions and 116 deletions

View File

@@ -11,16 +11,11 @@ class PuzzlesController < ApplicationController
def edit
authorize @contest
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
end
def new
authorize @contest
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
@puzzle = Puzzle.new
end
@@ -32,8 +27,6 @@ class PuzzlesController < ApplicationController
if @puzzle.save
redirect_to contest_path(@contest), notice: t("puzzles.new.notice")
else
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
render :new, status: :unprocessable_entity
end
end
@@ -44,8 +37,6 @@ class PuzzlesController < ApplicationController
if @puzzle.update(puzzle_params)
redirect_to @contest, notice: t("puzzles.edit.notice")
else
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
render :edit, status: :unprocessable_entity
end
end