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

@@ -8,21 +8,11 @@ class CompletionsController < ApplicationController
def edit
authorize @contest
if @contestant
@action_name = t("helpers.buttons.back_to_contestant")
@action_path = edit_contest_contestant_path(@contest, @contestant)
end
end
def new
authorize @contest
if @contestant
@action_name = t("helpers.buttons.back_to_contestant")
@action_path = edit_contest_contestant_path(@contest, @contestant)
end
@completion = Completion.new
@completion.completed = true
if params[:contestant_id]
@@ -47,11 +37,6 @@ class CompletionsController < ApplicationController
else
if params[:completion].key?(:message_id)
@message = Message.find(params[:completion][:message_id])
@action_name = t("helpers.buttons.back")
@action_path = contest_path(@contest)
elsif @contestant
@action_name = t("helpers.buttons.back_to_contestant")
@action_path = edit_contest_contestant_path(@contest, @contestant)
end
render :new, status: :unprocessable_entity
end