routes.rb 702 B

1234567891011121314151617181920212223242526272829303132
  1. Rails.application.routes.draw do
  2. resources :news_posts
  3. root 'sessions#new'
  4. get '/home', to: 'static_pages#home'
  5. get '/about', to: 'static_pages#about'
  6. get '/login', to: 'sessions#new'
  7. post '/login', to: 'sessions#create'
  8. delete '/logout', to: 'sessions#destroy'
  9. resources :users do
  10. member do
  11. get :courses
  12. end
  13. end
  14. resources :conversations
  15. resources :conversation_participations
  16. resources :messages
  17. resources :schools
  18. resources :courses
  19. resources :course_participations
  20. resources :lectures
  21. resources :assignments do
  22. resources :submissions, shallow: true
  23. end
  24. resources :data_files do
  25. member do
  26. get :download
  27. end
  28. end
  29. end