class ActionDispatch::Routing::Mapper
def self.normalize_name(name)
def self.normalize_name(name) normalize_path(name)[1..-1].gsub("/", "_") end
def self.normalize_path(path)
(:locale) becomes (/:locale) instead of /(:locale). Except
Invokes Rack::Mount::Utils.normalize path and ensure that
def self.normalize_path(path) path = Journey::Router::Utils.normalize_path(path) path.gsub!(%r{/(\(+)/?}, '\1/') unless path =~ %r{^/\(+[^/]+\)$} path end
def initialize(set) #:nodoc:
def initialize(set) #:nodoc: @set = set @scope = { :path_names => @set.resources_path_names } end