about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-26 14:01:02 +0200
committerGitHub <noreply@github.com>2022-10-26 14:01:02 +0200
commitca6e92fdb83ca00fe0c5c632ab81f9eaf47cafd2 (patch)
tree0e01244592e1bebb254524910c0bf0d4529d3d08 /config
parent1ce17cf316c3d4021f60998981e542a20a7038bb (diff)
Fix warning about constants in routes (#19466)
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb52
1 files changed, 26 insertions, 26 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 12726a677..fd0cbab2b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -3,32 +3,32 @@
 require 'sidekiq_unique_jobs/web'
 require 'sidekiq-scheduler/web'
 
-# Paths of routes on the web app that to not require to be indexed or
-# have alternative format representations requiring separate controllers
-WEB_APP_PATHS = %w(
-  /getting-started
-  /keyboard-shortcuts
-  /home
-  /public
-  /public/local
-  /conversations
-  /lists/(*any)
-  /notifications
-  /favourites
-  /bookmarks
-  /pinned
-  /start
-  /directory
-  /explore/(*any)
-  /search
-  /publish
-  /follow_requests
-  /blocks
-  /domain_blocks
-  /mutes
-).freeze
-
 Rails.application.routes.draw do
+  # Paths of routes on the web app that to not require to be indexed or
+  # have alternative format representations requiring separate controllers
+  web_app_paths = %w(
+    /getting-started
+    /keyboard-shortcuts
+    /home
+    /public
+    /public/local
+    /conversations
+    /lists/(*any)
+    /notifications
+    /favourites
+    /bookmarks
+    /pinned
+    /start
+    /directory
+    /explore/(*any)
+    /search
+    /publish
+    /follow_requests
+    /blocks
+    /domain_blocks
+    /mutes
+  ).freeze
+
   root 'home#index'
 
   mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development?
@@ -677,7 +677,7 @@ Rails.application.routes.draw do
     end
   end
 
-  WEB_APP_PATHS.each do |path|
+  web_app_paths.each do |path|
     get path, to: 'home#index'
   end