routes.rb 505 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'
4
  get 'search/update', to: 'search#update', as: 'update_cookie'
Zac Wood's avatar
Zac Wood committed
5

6
7
  resources :instructors, only: [:index, :show]

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

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

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