routes.rb 540 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. # load routes from external files
  8. dir = File.expand_path('../', __FILE__)
  9. files = Dir.glob( "#{dir}/routes/*.rb" )
  10. files.each do |file|
  11. if Rails.configuration.cache_classes
  12. require file
  13. else
  14. load file
  15. end
  16. end
  17. match '*a', to: 'errors#routing', via: [:get, :post, :put, :delete]
  18. end