discourse/lib/configurable_urls.rb
Bianca Nenciu 5fc1586abf
PERF: Cache ToS and Privacy Policy paths (#21860)
Checking if the topic exists happened often and that can cause
performance issues.
2023-06-07 21:31:20 +03:00

16 lines
272 B
Ruby

# frozen_string_literal: true
module ConfigurableUrls
def faq_path
SiteSetting.faq_url.blank? ? "#{Discourse.base_path}/faq" : SiteSetting.faq_url
end
def tos_url
Discourse.tos_url
end
def privacy_policy_url
Discourse.privacy_policy_url
end
end