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, except: :update, concern: :deletable do
member do
post :rate
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
get 'feed', to: 'activities#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

Israel Barreto Sant'Anna
committed
get :search, to: 'search#index'
get 'search/autocomplete', to: 'search#autocomplete'
resources :collections, concerns: [:followable, :sociable, :reviewable, :taggable, :versionable, :deletable]
resources :learning_objects, concerns: [:sociable, :reviewable, :taggable, :versionable, :deletable] 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, :update]
post '/package', to: 'packages#link'