Merge settings & core indexes into a single nav
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user