Newer
Older
Rails.application.routes.draw do
namespace :auth do
mount_devise_token_auth_for 'User', skip: [:omniauth_callbacks]
end
namespace :management do
root 'welcome#index'
resources :statistics do
collection do
get :users
get :collections
get :accesses
resources :users do
resource :admin, only: [:create, :destroy]
resource :curator, only: [:create, :destroy]
collection do
get :curators
get :admins
end
end
Mauricio Giacomini Girardello
committed
resources :highlights
Mauricio Giacomini Girardello
committed
end
Mauricio Giacomini Girardello
committed
root 'welcome#index'
resources :learning_objects do
member do
post :like
post :bookmarks
Mauricio Giacomini Girardello
committed
get :collections
resources :institutions
resources :collections do
Mauricio Giacomini Girardello
committed
member do
Mauricio Giacomini Girardello
committed
# add a learning object for some collection
post '/learning_object/:learning_object_id', as: :add_learning_object, action: :add_learning_object
Mauricio Giacomini Girardello
committed
# remove a learning object for some collection
delete '/learning_object/:learning_object_id', as: :destroy_learning_object, action: :remove_learning_object
Mauricio Giacomini Girardello
committed
end
end
Mauricio Giacomini Girardello
committed
resources :subjects, only: [:index, :show]
#resources :complaints, only: [:create, :destroy]
resources :users, only: [:show] do
collection do
get :me
end
end
get '/search' => 'search#index', as: 'search'
get '/search/fetch' => 'search#fetch', as: 'search_fetch'
get '/autocomplete' => 'search#autocomplete'
Mauricio Giacomini Girardello
committed
get '/subject/:id' => 'welcome#subject', as: 'subject_index'
get '/follow_collection' => 'welcome#follow_collection'
get '/file_outside_user' => 'welcome#file_outside_user'