|
|
|
@@ -4,6 +4,7 @@ class SettingsController < ApplicationController |
|
|
|
get_navbar |
|
|
|
get_add_menu |
|
|
|
get_common_menu |
|
|
|
get_sub_competitions |
|
|
|
get_personal_menu |
|
|
|
get_third_party |
|
|
|
get_top_system_notification |
|
|
|
@@ -29,6 +30,15 @@ class SettingsController < ApplicationController |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
def get_sub_competitions |
|
|
|
@sub_competitions = [] |
|
|
|
Site.add.pluck(:key).each do |key| |
|
|
|
hash = {} |
|
|
|
hash.merge!("#{key.to_s}": Site.add.where(key: key).select(:id, :name, :url, :key).to_a.map(&:serializable_hash)) |
|
|
|
@sub_competitions << hash |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
def get_common_menu |
|
|
|
@common = {} |
|
|
|
Site.common.select(:url, :key).each do |site| |
|
|
|
|