routes.rb 607 B

1234567891011121314151617181920212223
  1. Rails.application.routes.draw do
  2. # app init
  3. match '/init', to: 'init#index', via: :get
  4. match '/app', to: 'init#index', via: :get
  5. # just remember to delete public/index.html.
  6. root to: 'init#index', via: :get
  7. root to: 'errors#routing', via: %i[post put delete options]
  8. # load routes from external files
  9. dir = File.expand_path(__dir__)
  10. files = Dir.glob( "#{dir}/routes/*.rb" )
  11. files.each do |file|
  12. if Rails.configuration.cache_classes
  13. require_dependency file
  14. else
  15. load file
  16. end
  17. end
  18. match '*a', to: 'errors#routing', via: %i[get post put delete options]
  19. end