routes.rb 534 Bytes
Newer Older
1
# Registers all routes for the app.
Zac Wood's avatar
Zac Wood committed
2
Rails.application.routes.draw do
Zac Wood's avatar
Zac Wood committed
3
  get 'search', to: 'search#index'
Zac Wood's avatar
Zac Wood committed
4
  get 'sessions/update', as: 'update_session'
5

6
  resources :instructors, only: [:index, :show]
Zac Wood's avatar
Zac Wood committed
7

8
  scope :api do # Register /api routes
Zach Perkins's avatar
Zach Perkins committed
9
    resources :courses, only: [:index, :show]
10
    resources :course_sections, only: [:index]
Zac Wood's avatar
Zac Wood committed
11
    resources :instructors, only: [:index, :show]
12
    resources :course_listings, only: [:index]
13
    resources :schedules, only: [:index]
Zac Wood's avatar
Zac Wood committed
14
15
  end

Zac Wood's avatar
Zac Wood committed
16
  apipie # sets up API docs
Zac Wood's avatar
Zac Wood committed
17

18
  root to: 'home#index'
Zac Wood's avatar
Zac Wood committed
19
end