routes.rb 442 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'
Zac Wood's avatar
Zac Wood committed
5

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

Zac Wood's avatar
Zac Wood committed
13
  apipie # sets up API docs
Zac Wood's avatar
Zac Wood committed
14

15
  root to: 'home#index'
Zac Wood's avatar
Zac Wood committed
16
end