Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a97e818620
Fetching contributors…

Cannot retrieve contributors at this time

57 lines (49 sloc) 1.79 kb
Uclass::Application.routes.draw do
# Institutions
constraints Routing.new(not: ['www', 'development'], include_blankness: true) do
# Authentication
resource :session, only: [:new, :create, :destroy]
controller :sessions do
get :tutorial
get '/auth/google_oauth2/callback', action: 'callback'
get '/auth/google_oauth2/failure', action: 'failure'
end
resource :user, only: [:edit, :update] do
member do
get :setup, :widgets
post 'setup/:module', action: 'setup_module'
end
end
resources :notifications, only: [:index] do
get :read, on: :member
end
resources :sections, path: 'courses', except: [:new, :create, :destroy] do
resources :notices, except: [:index, :show]
resources :pages, except: :index do
get 'reorder', on: :collection
end
resources :documents do
get 'download', on: :member
get 'reorder', on: :collection
end
resources :events do
get ':year(/:month)', action: 'index', as: 'calendar', on: :collection, constraints: {year: /20[0-9]{2}/, month: /(?:0?[1-9]|1[0-2])/}
post 'upload', on: :member
resource :grades, only: [:edit, :update] do
get 'analysis', on: :collection
end
end
get 'roster', on: :member
resources :grades, only: [:index] do
get 'trends', on: :collection
end
end
get '/events(/:year(/:month))', to: 'events#index', as: 'events', constraints: {year: /20[0-9]{2}/, month: /(?:0?[1-9]|1[0-2])/}
get '/grades', to: 'grades#index', as: 'grades'
root to: 'institutions#index'
end
# Corporate
constraints Routing.new(is: ['www', 'development'], include_blankness: true) do
root to: 'corporate#index'
end
end
Jump to Line
Something went wrong with that request. Please try again.