Add notices
This commit is contained in:
@@ -24,7 +24,7 @@ class ContestantsController < ApplicationController
|
||||
@contestant = Contestant.new(contestant_params)
|
||||
@contestant.contest_id = @contest.id
|
||||
if @contestant.save
|
||||
redirect_to contest_path(@contest)
|
||||
redirect_to contest_path(@contest), notice: t("contestants.new.notice")
|
||||
else
|
||||
@action_name = t("helpers.buttons.back")
|
||||
@action_path = contest_path(@contest)
|
||||
@@ -36,7 +36,7 @@ class ContestantsController < ApplicationController
|
||||
authorize @contest
|
||||
|
||||
if @contestant.update(contestant_params)
|
||||
redirect_to @contest
|
||||
redirect_to @contest, notice: t("contestants.edit.notice")
|
||||
else
|
||||
@action_name = t("helpers.buttons.back")
|
||||
@action_path = contest_path(@contest)
|
||||
@@ -48,7 +48,7 @@ class ContestantsController < ApplicationController
|
||||
authorize @contest
|
||||
|
||||
@contestant.destroy
|
||||
redirect_to contest_path(@contest)
|
||||
redirect_to contest_path(@contest), notice: t("contestants.destroy.notice")
|
||||
end
|
||||
|
||||
def import
|
||||
@@ -101,7 +101,7 @@ class ContestantsController < ApplicationController
|
||||
end
|
||||
end
|
||||
end
|
||||
redirect_to contest_path(@contest)
|
||||
redirect_to contest_path(@contest), notice: t("contestants.import.notice")
|
||||
else
|
||||
@action_name = t("helpers.buttons.back")
|
||||
@action_path = contest_path(@contest)
|
||||
|
||||
Reference in New Issue
Block a user