2014-10-07 23:00:55 +00:00
|
|
|
require 'sidekiq/web'
|
|
|
|
|
2014-07-30 05:24:20 +00:00
|
|
|
Metamaps::Application.routes.draw do
|
2012-09-23 02:39:12 +00:00
|
|
|
|
2013-01-08 04:03:41 +00:00
|
|
|
root to: 'main#home', via: :get
|
2014-10-07 23:00:55 +00:00
|
|
|
|
2014-10-07 23:01:41 +00:00
|
|
|
#To debug sidekiq and monitor processes, enable this route
|
|
|
|
#mount Sidekiq::Web, at: '/sidekiq'
|
2012-09-23 02:39:12 +00:00
|
|
|
|
2013-02-04 00:13:21 +00:00
|
|
|
match 'request', to: 'main#requestinvite', via: :get, as: :request
|
2012-10-29 17:52:29 +00:00
|
|
|
|
2014-08-12 22:14:04 +00:00
|
|
|
match 'search/topics', to: 'main#searchtopics', via: :get, as: :searchtopics
|
|
|
|
match 'search/maps', to: 'main#searchmaps', via: :get, as: :searchmaps
|
|
|
|
match 'search/mappers', to: 'main#searchmappers', via: :get, as: :searchmappers
|
|
|
|
match 'search/synapses', to: 'main#searchsynapses', via: :get, as: :searchsynapses
|
2012-12-23 06:12:56 +00:00
|
|
|
|
2014-07-30 05:24:20 +00:00
|
|
|
resources :mappings, except: [:index, :new, :edit]
|
2014-06-11 23:18:59 +00:00
|
|
|
resources :metacode_sets, :except => [:show]
|
|
|
|
resources :metacodes, :except => [:show, :destroy]
|
2014-07-30 05:24:20 +00:00
|
|
|
resources :synapses, except: [:index, :new, :edit]
|
2014-02-05 17:37:21 +00:00
|
|
|
resources :topics, except: [:index, :new, :edit] do
|
2014-01-29 03:46:58 +00:00
|
|
|
get :autocomplete_topic, :on => :collection
|
2012-12-14 07:16:17 +00:00
|
|
|
end
|
2014-08-11 22:57:34 +00:00
|
|
|
match 'topics/:id/network', to: 'topics#network', via: :get, as: :network
|
2012-12-14 07:16:17 +00:00
|
|
|
|
2014-08-06 14:09:01 +00:00
|
|
|
match 'explore/active', to: 'maps#index', via: :get, as: :activemaps
|
|
|
|
match 'explore/featured', to: 'maps#index', via: :get, as: :featuredmaps
|
2014-08-10 17:06:58 +00:00
|
|
|
match 'explore/mine', to: 'maps#index', via: :get, as: :mymaps
|
2014-02-10 04:36:23 +00:00
|
|
|
match 'maps/mappers/:id', to: 'maps#index', via: :get, as: :usermaps
|
2014-02-21 01:22:13 +00:00
|
|
|
match 'maps/topics/:id', to: 'maps#index', via: :get, as: :topicmaps
|
2014-02-05 17:37:21 +00:00
|
|
|
resources :maps, except: [:new, :edit]
|
2013-02-19 14:44:43 +00:00
|
|
|
match 'maps/:id/embed', to: 'maps#embed', via: :get, as: :embed
|
2014-08-11 22:57:34 +00:00
|
|
|
match 'maps/:id/contains', to: 'maps#contains', via: :get, as: :contains
|
2012-12-16 20:00:43 +00:00
|
|
|
|
2014-10-07 21:46:09 +00:00
|
|
|
devise_for :users, controllers: { registrations: 'users/registrations', passwords: 'users/passwords', sessions: 'devise/sessions' }, :skip => [:sessions]
|
|
|
|
|
|
|
|
devise_scope :user do
|
|
|
|
get 'login' => 'devise/sessions#new', :as => :new_user_session
|
|
|
|
post 'login' => 'devise/sessions#create', :as => :user_session
|
|
|
|
get 'logout' => 'devise/sessions#destroy', :as => :destroy_user_session
|
|
|
|
get 'join' => 'devise/registrations#new', :as => :new_user_registration
|
2014-01-29 03:46:58 +00:00
|
|
|
end
|
2014-10-07 21:46:09 +00:00
|
|
|
|
2014-06-04 19:24:16 +00:00
|
|
|
match 'user/updatemetacodes', to: 'users#updatemetacodes', via: :post, as: :updatemetacodes
|
2014-07-30 05:24:20 +00:00
|
|
|
resources :users, except: [:index, :destroy]
|
2012-09-23 02:39:12 +00:00
|
|
|
end
|