Namespace
Module
- ActionDispatch::Routing::Mapper::Base
- ActionDispatch::Routing::Mapper::Concerns
- ActionDispatch::Routing::Mapper::CustomUrls
- ActionDispatch::Routing::Mapper::HttpHelpers
- ActionDispatch::Routing::Mapper::Resources
- ActionDispatch::Routing::Mapper::Scoping
Methods
Included Modules
- ActionDispatch::Routing::Mapper::Base
- ActionDispatch::Routing::Mapper::HttpHelpers
- ActionDispatch::Routing::Redirection
- ActionDispatch::Routing::Mapper::Scoping
- ActionDispatch::Routing::Mapper::Concerns
- ActionDispatch::Routing::Mapper::Resources
- ActionDispatch::Routing::Mapper::CustomUrls
Constants
URL_OPTIONS | = | [:protocol, :subdomain, :domain, :host, :port] |
Class Public methods
normalize_name(name)
📝 Source code
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 397
def self.normalize_name(name)
normalize_path(name)[1..-1].tr("/", "_")
end
🔎 See on GitHub
normalize_path(path)
Invokes Journey::Router::Utils.normalize_path and ensure that (:locale) becomes (/:locale) instead of /(:locale). Except for root cases, where the latter is the correct one.
📝 Source code
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 391
def self.normalize_path(path)
path = Journey::Router::Utils.normalize_path(path)
path.gsub!(%r{/(\(+)/?}, '\1/') unless path =~ %r{^/(\(+[^)]+\)){1,}$}
path
end
🔎 See on GitHub