mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Use a mixin for the path
function to DRY it up
This commit is contained in:
@ -6,11 +6,13 @@ require_dependency 'age_words'
|
||||
require_dependency 'configurable_urls'
|
||||
require_dependency 'mobile_detection'
|
||||
require_dependency 'category_badge'
|
||||
require_dependency 'global_path'
|
||||
|
||||
module ApplicationHelper
|
||||
include CurrentUser
|
||||
include CanonicalURL::Helpers
|
||||
include ConfigurableUrls
|
||||
include GlobalPath
|
||||
|
||||
def shared_session_key
|
||||
if SiteSetting.long_polling_base_url != '/'.freeze && current_user
|
||||
@ -23,10 +25,6 @@ module ApplicationHelper
|
||||
end
|
||||
end
|
||||
|
||||
def path(path)
|
||||
"#{GlobalSetting.relative_url_root}#{path}"
|
||||
end
|
||||
|
||||
def script(*args)
|
||||
if SiteSetting.enable_cdn_js_debugging && GlobalSetting.cdn_url
|
||||
tags = javascript_include_tag(*args, "crossorigin" => "anonymous")
|
||||
|
Reference in New Issue
Block a user