Newer
Older
Rails.application.routes.draw do
concern :deletable do
collection do
get :deleted
end
end

Mauricio Giacomini Girardello
committed
concern :followable do

Lucas Gabriel Lima
committed
post 'follow', as: :follow, action: :follow
delete 'follow', as: :unfollow, action: :unfollow

Lucas Gabriel Lima
committed
post 'tagging', as: :tagging, action: :tagging
delete 'tagging', as: :untagging, action: :untagging

Lucas Gabriel Lima
committed
post 'like', as: :like, action: :like
delete 'like', as: :unlike, action: :unlike
Mauricio Giacomini Girardello
committed
end
end
Mauricio Giacomini Girardello
committed
concern :reviewable do
resources :reviews, only: [:index, :create, :show, :destroy], concerns: :deletable do
member do
post :rate
end
concern :highlights do
collection do
get :this_week
get :this_month
end
end
# GET /learning_objects/1/versions/123
# GET /learning_objects/1/versions
# POST /learning_objects/1/versions/234/checkout
concern :versionable do
resources :versions, only: [:show, :index] do
member do
post :checkout
end
end
end
mount_devise_token_auth_for 'User', skip: [:omniauth_callbacks], at: :auth
resources :activities, only: :index
resources :users, concerns: [:followable, :deletable] do
resources :bookmarks, module: 'users', only: [:index, :create, :destroy]
get 'watching/:object_type', to: 'users#watching'
get 'activities', to: 'activities#user_activities'
Marcela Ribeiro de Oliveira
committed
end
# search routes
resources :search, only: :index do
collection do
get :autocomplete
end
end
resources :collections, concerns: [:followable, :sociable, :reviewable, :taggable, :versionable, :deletable, :highlights] do
member do
post :items, to: 'collections#add_object'
end
end
resources :learning_objects, concerns: [:sociable, :reviewable, :taggable, :versionable, :deletable, :highlights] do
resource :chunk, module: 'learning_objects', only: [:create, :show]
resource :upload, module: 'learning_objects', only: :create
resources :institutions, concerns: :deletable do
member do
get :users, to: 'institutions#users'
end
resources :complaints, only: [:index, :create], concerns: :deletable
resources :languages, except: [:new, :edit]
resources :licenses, except: [:new, :edit]
resources :mime_types, except: [:new, :edit]
resources :object_types, except: [:new, :edit]
resources :scores, only: [:index, :show, :update]

Israel Barreto Sant'Anna
committed
resources :ratings, except: [:new, :edit]
post '/package', to: 'packages#link'