Namespace
- MODULE ActionDispatch::Routing::Mapper::Base
- MODULE ActionDispatch::Routing::Mapper::HttpHelpers
- MODULE ActionDispatch::Routing::Mapper::Resources
- MODULE 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::Resources
Class Public methods
Source: show
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 249 def self.normalize_name(name) normalize_path(name)[1..-1].gsub("/", "_") end
Invokes Rack::Mount::Utils.normalize path and ensure that (:locale) becomes (/:locale) instead of /(:locale). Except for root cases, where the latter is the correct one.
Source: show
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 243 def self.normalize_path(path) path = Rack::Mount::Utils.normalize_path(path) path.gsub!(%r{/(\(+)/?}, '\1/') unless path =~ %r{^/\(+[^/]+\)$} path end