routes.rb 795 B

123456789101112131415161718192021222324252627
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. Rails.application.routes.draw do
  3. # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
  4. # app init
  5. match '/init', to: 'init#index', via: :get
  6. match '/app', to: 'init#index', via: :get
  7. # just remember to delete public/index.html.
  8. root to: 'init#index', via: :get
  9. root to: 'errors#routing', via: %i[post put delete options], as: nil
  10. # load routes from external files
  11. dir = File.expand_path(__dir__)
  12. files = Dir.glob("#{dir}/routes/*.rb")
  13. files.each do |file|
  14. if Rails.configuration.cache_classes
  15. require_dependency file
  16. else
  17. load file
  18. end
  19. end
  20. match '*a', to: 'errors#routing', via: %i[get post put delete options]
  21. end