Add contest badges
This commit is contained in:
@@ -8,6 +8,7 @@ class ContestsController < ApplicationController
|
||||
|
||||
def show
|
||||
@title = @contest.name
|
||||
set_badges
|
||||
end
|
||||
|
||||
def edit
|
||||
@@ -42,6 +43,12 @@ class ContestsController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def set_badges
|
||||
@badges = []
|
||||
@badges.push("team") if @contest.team
|
||||
@badges.push("registration") if @contest.allow_registration
|
||||
end
|
||||
|
||||
def set_contest
|
||||
@contest = Contest.find(params[:id])
|
||||
end
|
||||
|
Reference in New Issue
Block a user