class ActionDispatch::Routing::Mapper
def self.normalize_path(path)
(:locale) becomes (/:locale) instead of /(:locale). Except
Invokes Journey::Router::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{^/(\(+[^)]+\)){1,}$} path end