mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-07-13 21:44:32 +08:00
竞赛配置子赛项
This commit is contained in:
@@ -32,9 +32,9 @@ class SettingsController < ApplicationController
|
|||||||
|
|
||||||
def get_sub_competitions
|
def get_sub_competitions
|
||||||
@sub_competitions = []
|
@sub_competitions = []
|
||||||
Site.add.pluck(:key).each do |key|
|
Site.competition.pluck(:key).each do |key|
|
||||||
hash = {}
|
hash = {}
|
||||||
hash.merge!("#{key.to_s}": Site.add.where(key: key).select(:id, :name, :url, :key).to_a.map(&:serializable_hash))
|
hash.merge!("#{key.to_s}": Site.competition.where(key: key).select(:id, :name, :url, :key).to_a.map(&:serializable_hash))
|
||||||
@sub_competitions << hash
|
@sub_competitions << hash
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user