Namespace
Methods
N
Included Modules
Constants
URL_OPTIONS = [:protocol, :subdomain, :domain, :host, :port]
 
SCOPE_OPTIONS = [:path, :shallow_path, :as, :shallow_prefix, :module, :controller, :action, :path_names, :constraints, :shallow, :blocks, :defaults, :options]
 
Class Public methods
normalize_name(name)
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 313
def self.normalize_name(name)
  normalize_path(name)[1..-1].tr("/", "_")
end
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.

# File actionpack/lib/action_dispatch/routing/mapper.rb, line 307
def self.normalize_path(path)
  path = Journey::Router::Utils.normalize_path(path)
  path.gsub!(%r{/(\(+)/?}, '\1/') unless path =~ %r{^/\(+[^)]+\)$}
  path
end