Setup I18n for titles
This commit is contained in:
@@ -5,15 +5,12 @@ class ContestantsController < ApplicationController
|
||||
|
||||
def edit
|
||||
authorize @contest
|
||||
|
||||
@title = "Contestant"
|
||||
end
|
||||
|
||||
def new
|
||||
authorize @contest
|
||||
|
||||
@contestant = Contestant.new
|
||||
@title = "New contestant"
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -24,7 +21,6 @@ class ContestantsController < ApplicationController
|
||||
if @contestant.save
|
||||
redirect_to contest_path(@contest)
|
||||
else
|
||||
@title = "New contestant"
|
||||
render :new, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
@@ -35,7 +31,6 @@ class ContestantsController < ApplicationController
|
||||
if @contestant.update(contestant_params)
|
||||
redirect_to @contest
|
||||
else
|
||||
@title = "Contestant"
|
||||
render :edit, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user