Add notices
This commit is contained in:
@@ -37,9 +37,9 @@ class CompletionsController < ApplicationController
|
||||
if @completion.save
|
||||
extend_completions!(@completion.contestant)
|
||||
if @contestant && !params[:completion].key?(:message_id)
|
||||
redirect_to edit_contest_contestant_path(@contest, @contestant)
|
||||
redirect_to edit_contest_contestant_path(@contest, @contestant), notice: t("completions.new.notice")
|
||||
else
|
||||
redirect_to @contest
|
||||
redirect_to @contest, notice: t("completions.new.notice")
|
||||
end
|
||||
else
|
||||
if params[:completion].key?(:message_id)
|
||||
@@ -61,9 +61,9 @@ class CompletionsController < ApplicationController
|
||||
if @completion.update(completion_params)
|
||||
extend_completions!(@completion.contestant)
|
||||
if @contestant
|
||||
redirect_to edit_contest_contestant_path(@contest, @contestant)
|
||||
redirect_to edit_contest_contestant_path(@contest, @contestant), notice: t("completions.edit.notice")
|
||||
else
|
||||
redirect_to @contest
|
||||
redirect_to @contest, notice: t("completions.edit.notice")
|
||||
end
|
||||
else
|
||||
if @contestant
|
||||
@@ -79,9 +79,9 @@ class CompletionsController < ApplicationController
|
||||
|
||||
@completion.destroy
|
||||
if params[:contestant_id]
|
||||
redirect_to contest_contestant_path(@contest, params[:contestant_id])
|
||||
redirect_to contest_contestant_path(@contest, params[:contestant_id]), notice: t("completions.destroy.notice")
|
||||
else
|
||||
redirect_to contest_path(@contest)
|
||||
redirect_to contest_path(@contest), notice: t("completions.destroy.notice")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user