mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-25 23:34:14 +00:00
Fix warning about constants in routes (#19466)
This commit is contained in:
parent
1ce17cf316
commit
ca6e92fdb8
|
@ -3,9 +3,10 @@
|
||||||
require 'sidekiq_unique_jobs/web'
|
require 'sidekiq_unique_jobs/web'
|
||||||
require 'sidekiq-scheduler/web'
|
require 'sidekiq-scheduler/web'
|
||||||
|
|
||||||
# Paths of routes on the web app that to not require to be indexed or
|
Rails.application.routes.draw do
|
||||||
# have alternative format representations requiring separate controllers
|
# Paths of routes on the web app that to not require to be indexed or
|
||||||
WEB_APP_PATHS = %w(
|
# have alternative format representations requiring separate controllers
|
||||||
|
web_app_paths = %w(
|
||||||
/getting-started
|
/getting-started
|
||||||
/keyboard-shortcuts
|
/keyboard-shortcuts
|
||||||
/home
|
/home
|
||||||
|
@ -26,9 +27,8 @@ WEB_APP_PATHS = %w(
|
||||||
/blocks
|
/blocks
|
||||||
/domain_blocks
|
/domain_blocks
|
||||||
/mutes
|
/mutes
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
Rails.application.routes.draw do
|
|
||||||
root 'home#index'
|
root 'home#index'
|
||||||
|
|
||||||
mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development?
|
mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development?
|
||||||
|
@ -677,7 +677,7 @@ Rails.application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
WEB_APP_PATHS.each do |path|
|
web_app_paths.each do |path|
|
||||||
get path, to: 'home#index'
|
get path, to: 'home#index'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue