Fix contest creation
This commit is contained in:
@@ -56,12 +56,15 @@ class ContestsController < ApplicationController
|
||||
authorize :contest
|
||||
|
||||
@contest = Contest.new
|
||||
@title = I18n.t("contests.new.title")
|
||||
end
|
||||
|
||||
def create
|
||||
authorize :contest
|
||||
|
||||
@contest = Contest.new(new_contest_params)
|
||||
@contest.lang = @current_user.lang
|
||||
@contest.ranking_mode = "actual"
|
||||
@contest.user_id = current_user.id
|
||||
if @contest.save
|
||||
redirect_to "/contests/#{@contest.id}/settings/general", notice: t("contests.new.notice")
|
||||
|
||||
Reference in New Issue
Block a user