dev_sync_trustie
cxt 5 years ago
parent 31bfcfc54a
commit 55a66f0452

@ -8,17 +8,17 @@ class CompetitionModule < ApplicationRecord
def module_url def module_url
case module_type case module_type
when "home" when "home"
"/competitions/#{competition.identifier}" "/competitions/#{competition.identifier}.json"
when "inform" when "inform"
"/competitions/#{competition.identifier}/informs?status=1" "/competitions/#{competition.identifier}/informs.json?status=1"
when "manual" when "manual"
"/competitions/#{competition.identifier}/informs?status=2" "/competitions/#{competition.identifier}/informs.json?status=2"
when "chart" when "chart"
"/competitions/#{competition.identifier}/charts" "/competitions/#{competition.identifier}/charts.json"
when "enroll" when "enroll"
"/competitions/#{competition.identifier}/competition_teams" "/competitions/#{competition.identifier}/competition_teams.json"
else else
url || "/competitions/#{competition.identifier}/md_content?md_content_id=#{competition_module_md_content&.id}" url || "/competitions/#{competition.identifier}/md_content.json?md_content_id=#{competition_module_md_content&.id}"
end end
end end
end end

Loading…
Cancel
Save