Module: Gitlab::Routing
- Extended by:
- ActiveSupport::Concern
- Included in:
- API::Entities::Branch, API::Entities::ProjectRepositoryStorage, API::Entities::ProjectUpload, AlertManagement::HttpIntegration, Atlassian::JiraConnect::Serializers::AuthorEntity, Atlassian::JiraConnect::Serializers::BaseEntity, Atlassian::JiraConnect::Serializers::BuildEntity, Atlassian::JiraConnect::Serializers::DeploymentEntity, Atlassian::JiraConnect::Serializers::FeatureFlagEntity, Atlassian::JiraConnect::Serializers::FileEntity, Atlassian::JiraConnect::Serializers::PipelineEntity, ChatNames::AuthorizeUserService, Ci::ExpirePipelineCacheService::UrlHelpers, Ci::FindExposedArtifactsService, Ci::TriggerEntity, ContextCommitsDiffEntity, ErrorTracking::IssueDetailsService, ErrorTracking::ProjectErrorTrackingSetting, AlertManagement::Payload::Base, Ci::Badge::Metadata, Ci::Status::Core, Ci::Status::Stage::PlayManual, CodeNavigationPath, Conflict::File, Email::Message::BuildIosAppGuide, Email::Message::RepositoryPush, SlashCommands::Presenters::Base, UrlBuilder, View::Presenter::Base, GroupAccessTokenEntity, ImpersonationAccessTokenEntity, Integrations::Jira, Integrations::SlackInteractions::IncidentManagement::IncidentModalSubmitService, Integrations::Zentao, IssuableLinks::ListService, IssuableSidebarTodoEntity, JiraConnect::AppDataSerializer, JiraConnect::SubscriptionEntity, JiraConnectInstallation, MergeRequestDiffEntity, Mutations::Commits::Create::UrlHelpers, PersonalAccessTokenEntity, ProjectAccessTokenEntity, Projects::BranchesByModeService, Projects::SlackApplicationInstallService, Sidebars::Menu, Types::AlertManagement::PrometheusIntegrationType, WebIdeTerminal
- Defined in:
- lib/gitlab/routing.rb
Defined Under Namespace
Classes: LegacyRedirector
Class Method Summary collapse
- .includes_helpers(klass) ⇒ Object
- .redirect_legacy_paths(router, *paths) ⇒ Object
-
.url_helpers ⇒ Object
Returns the URL helpers Module.
Class Method Details
.includes_helpers(klass) ⇒ Object
46 47 48 |
# File 'lib/gitlab/routing.rb', line 46 def self.includes_helpers(klass) self._includers << klass end |
.redirect_legacy_paths(router, *paths) ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'lib/gitlab/routing.rb', line 60 def self.redirect_legacy_paths(router, *paths) paths.each do |path| router.match "/#{path}(/*rest)", via: [:get, :post, :patch, :delete], to: router.redirect(LegacyRedirector.new(path)), as: "legacy_#{path}_redirect" end end |
.url_helpers ⇒ Object
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.
56 57 58 |
# File 'lib/gitlab/routing.rb', line 56 def self.url_helpers @url_helpers ||= Gitlab::Application.routes.url_helpers end |