2016-03-24 12:00:26 -04:00
|
|
|
module Gitlab
|
|
|
|
module Routing
|
2016-12-13 08:51:23 -05:00
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
include Gitlab::Routing.url_helpers
|
|
|
|
end
|
|
|
|
|
2016-03-24 12:00:26 -04:00
|
|
|
# Returns the URL helpers Module.
|
|
|
|
#
|
|
|
|
# This method caches the output as Rails' "url_helpers" method creates an
|
|
|
|
# anonymous module every time it's called.
|
|
|
|
#
|
|
|
|
# Returns a Module.
|
|
|
|
def self.url_helpers
|
|
|
|
@url_helpers ||= Gitlab::Application.routes.url_helpers
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|