DEV: mount `DiscourseDev` engine routes at `/dev` path. (#12376)

This commit is contained in:
Vinoth Kannan 2021-03-13 00:17:06 +05:30 committed by GitHub
parent 361875b323
commit 1c672c97d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -114,7 +114,7 @@ GEM
railties (>= 3.1)
discourse-ember-source (3.12.2.3)
discourse-fonts (0.0.8)
discourse_dev (0.0.4)
discourse_dev (0.0.5)
faker (~> 2.16)
discourse_image_optim (0.26.2)
exifr (~> 1.2, >= 1.2.2)

View File

@ -963,6 +963,10 @@ Discourse::Application.routes.draw do
post "/do-not-disturb" => "do_not_disturb#create"
delete "/do-not-disturb" => "do_not_disturb#destroy"
if Rails.env.development?
mount DiscourseDev::Engine => "/dev/"
end
get "*url", to: 'permalinks#show', constraints: PermalinkConstraint.new
end
end