metamaps--metamaps/config/routes.rb

48 lines
1.7 KiB
Ruby
Raw Normal View History

2012-09-23 02:39:12 +00:00
ISSAD::Application.routes.draw do
root to: 'main#home', via: :get
2012-09-23 02:39:12 +00:00
match 'request', to: 'main#requestinvite', via: :get, as: :request
match 'invite', to: 'main#invite', via: :get, as: :invite
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 'maps/:id/savelayout', to: 'maps#savelayout', via: :put, as: :savelayout
match 'topics/:map_id/:topic_id/removefrommap', to: 'topics#removefrommap', via: :post, as: :removefrommap
match 'synapses/:map_id/:synapse_id/removefrommap', to: 'synapses#removefrommap', via: :post, as: :removefrommap
2012-09-23 02:39:12 +00:00
resources :topics do
get :autocomplete_topic, :on => :collection
2012-12-14 07:16:17 +00:00
end
match 'topics/:id/:format', to: 'topics#json', via: :get, as: :json
2012-12-14 07:16:17 +00:00
2012-12-21 00:24:27 +00:00
resources :synapses do
get :autocomplete_synapse_desc, :on => :collection
end
match 'synapses/:id/:format', to: 'synapses#json', via: :get, as: :json
2012-12-21 00:24:27 +00:00
2012-12-16 20:00:43 +00:00
resources :maps do
get :autocomplete_map_name, :on => :collection
end
2013-02-19 14:44:43 +00:00
match 'maps/:id/embed', to: 'maps#embed', via: :get, as: :embed
match 'maps/:id/:format', to: 'maps#json', via: :get, as: :json
2012-12-16 20:00:43 +00:00
2013-07-10 18:02:38 +00:00
devise_for :users, :path_names => { :sign_in => 'login', :sign_out => 'logout' }
devise_scope :user do
get "sign_out", :to => "devise/sessions#destroy"
end
resources :users, except: :show do
2012-12-16 20:00:43 +00:00
get :autocomplete_user_name, :on => :collection
resources :topics, :only => [:index]
resources :synapses, :only => [:index]
resources :maps, :only => [:index]
end
resources :mappings
2012-09-23 02:39:12 +00:00
end