routes.rb 401 Bytes
Newer Older
1
# Registers all routes for the app.
Zac Wood's avatar
Zac Wood committed
2
Rails.application.routes.draw do
3
4
5
6
  scope :api do # Register /api routes
    resources :courses, only: [:index] do # GET /api/courses
      resources :sections, only: [:index] # GET /api/courses/:course_id/sections
    end
Zac Wood's avatar
Zac Wood committed
7
8

    get 'search', controller: 'search', action: 'index'
Zac Wood's avatar
Zac Wood committed
9
10
  end

11
12
  get 'home/index'
  root 'home#index' # Set the root to be the home index
Zac Wood's avatar
Zac Wood committed
13
end