forked from zammad/zammad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.rb
27 lines (21 loc) · 795 Bytes
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
Rails.application.routes.draw do
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
# app init
match '/init', to: 'init#index', via: :get
match '/app', to: 'init#index', via: :get
# just remember to delete public/index.html.
root to: 'init#index', via: :get
root to: 'errors#routing', via: %i[post put delete options], as: nil
# load routes from external files
dir = File.expand_path(__dir__)
files = Dir.glob("#{dir}/routes/*.rb")
files.each do |file|
if Rails.configuration.cache_classes
require_dependency file
else
load file
end
end
match '*a', to: 'errors#routing', via: %i[get post put delete options]
end