Events: remaining fixes
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
sto
2026-08-06 11:26:51 +02:00
parent 77b4e06151
commit 817857ffd8
7 changed files with 58 additions and 47 deletions

View File

@@ -35,14 +35,14 @@ class EventsController < ApplicationController
def show
authorize @event
@contests = @event.contests.includes([ :contestants, :puzzles ])
@contests = @event.contests.includes([ :contestants, puzzles: [ :image_attachment ] ])
@title = @event.name
end
def edit
authorize @event
@title = I18n.t("events.edit.title")
@title = @event.name
@nonav = true
end
@@ -52,7 +52,7 @@ class EventsController < ApplicationController
if @event.update(event_params)
redirect_to event_path(@event), notice: t("events.edit.notice")
else
@title = I18n.t("events.edit.title")
@title = @event.name
@nonav = true
render :edit, status: :unprocessable_entity
end