-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathroutes.rb
More file actions
78 lines (59 loc) · 1.83 KB
/
routes.rb
File metadata and controls
78 lines (59 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Calagator::Application.routes.draw do
devise_for :users
resource :user, only: [:show]
mount RailsAdmin::Engine => '/rails_admin', :as => 'rails_admin'
match 'omfg' => 'site#omfg'
match 'hello' => 'site#hello'
match 'about' => 'site#about'
match 'opensearch.:format' => 'site#opensearch'
resources :events do
collection do
post :squash_many_duplicates
get :search, to: 'site#search', as: 'search'
get :duplicates
get :widget, :action => 'index', :widget => true
get 'widget/builder', :action => 'widget_builder'
end
member do
get :clone
end
end
resources :organizations do
resources :sources do
collection do
post :import
end
end
end
resources :venues do
collection do
post :squash_many_duplicates
get :map
get :duplicates
end
end
namespace :admin do
get '/' => :index
resources :topics, :types
resources :venues, :events do
collection do
get :duplicates
post :duplicates, :action => 'squash_many_duplicates'
end
end
end
resources :versions, :only => [:edit]
resources :changes, :controller => 'paper_trail_manager/changes'
match 'recent_changes' => redirect("/changes")
match 'recent_changes.:format' => redirect("/changes.%{format}")
match 'css/:name' => 'site#style'
match 'css/:name.:format' => 'site#style'
match '/' => 'events#index', :as => :root
match '/index' => 'site#index'
match '/index.:format' => 'site#index'
# deprecated routes, remove after 3 months or when too hard to maintain
get '/topics/:topic_name' => redirect('/events?topic=%{topic_name}') # created: 2013-08-13
get '/types/:type_name' => redirect('/events?type=%{type_name}') # created: 2013-08-13
match '/:controller(/:action(/:id))'
root :to => "events#index"
end