class ActionDispatch::Routing::Mapper::Mapping
def self.normalize_path(path, format)
def self.normalize_path(path, format) path = Mapper.normalize_path(path) if format == true "#{path}.:format" elsif optional_format?(path, format) "#{path}(.:format)" else path end end