Newer
Older
Rails.application.routes.draw do

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 do
member do
post :rate
end
mount_devise_token_auth_for 'User', skip: [:omniauth_callbacks], at: :auth
get 'feed', to: 'activities#index'
resources :users, concerns: [:followable] 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]
resources :learning_objects, concerns: [:sociable, :reviewable, :taggable] do
resource :chunk, module: 'learning_objects', only: [:create, :show]
resource :upload, module: 'learning_objects', only: :create
resources :institutions do
member do
get :users, to: 'institutions#users'
end
resources :scores, only: [:index, :update]
resources :object_types, except: [:new, :edit]
resources :mime_types, except: [:new, :edit]
resources :languages, except: [:new, :edit]
resources :complaints, only: [:index, :create]
post '/package', to: 'packages#link'