Refactor LetterOpenerWeb mounting condition
Prevent any attempt to access `LetterOpenerWeb` when running in production.
This commit is contained in:
parent
688a8e3561
commit
0ede7d550a
1 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,8 @@
|
|||
Osem::Application.routes.draw do
|
||||
mount LetterOpenerWeb::Engine, at: '/letter_opener' if Rails.env.development?
|
||||
|
||||
if Rails.env.development? && defined?(LetterOpenerWeb)
|
||||
mount LetterOpenerWeb::Engine, at: '/letter_opener'
|
||||
end
|
||||
|
||||
constraints DomainConstraint do
|
||||
get '/', to: 'conferences#show'
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue