From d0b44520bd36e271e0b935a6bd11fc9dc66a19d5 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 21 Dec 2017 17:17:25 -0500 Subject: [PATCH] Put back removed constants with deprecations for plugin compatibility --- config/routes.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/routes.rb b/config/routes.rb index 46ade1df6db..f3cb50b6fbf 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,6 +5,10 @@ require_dependency "staff_constraint" require_dependency "homepage_constraint" require_dependency "permalink_constraint" +# The following constants have been replaced with `RouteFormat` and are deprecated. +USERNAME_ROUTE_FORMAT = /[\w.\-]+?/ unless defined? USERNAME_ROUTE_FORMAT +BACKUP_ROUTE_FORMAT = /.+\.(sql\.gz|tar\.gz|tgz)/i unless defined? BACKUP_ROUTE_FORMAT + Discourse::Application.routes.draw do match "/404", to: "exceptions#not_found", via: [:get, :post]