Setup I18n for titles
All checks were successful
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 11s
CI / test (push) Successful in 26s

This commit is contained in:
sto
2025-03-27 12:15:27 +01:00
parent 26b8064553
commit 497768610d
10 changed files with 51 additions and 37 deletions

View File

@@ -4,15 +4,12 @@ class PuzzlesController < ApplicationController
def edit
authorize @contest
@title = "Edit contest puzzle"
end
def new
authorize @contest
@puzzle = Puzzle.new
@title = "New contest puzzle"
end
def create
@@ -23,7 +20,6 @@ class PuzzlesController < ApplicationController
if @puzzle.save
redirect_to contest_path(@contest)
else
@title = "New contest puzzle"
render :new, status: :unprocessable_entity
end
end
@@ -34,7 +30,6 @@ class PuzzlesController < ApplicationController
if @puzzle.update(puzzle_params)
redirect_to @contest
else
@title = "Edit contest puzzle"
render :edit, status: :unprocessable_entity
end
end