Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 206 lines (190 sloc) 8.786 kb
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
1 ActionController::Routing::Routes.draw do |map|
2 map.resources :partners, :member => {
3 :email => :get,
4 :picture => :get,
5 :picture_save => :post
6 }
7 map.resources :users, :has_one => [:password, :profile], :collection => {:endorsements => :get, :order => :post}, :member => {
8 :suspend => :put,
9 :unsuspend => :put,
10 :activities => :get,
11 :comments => :get,
12 :points => :get,
13 :discussions => :get,
14 :capital => :get,
15 :impersonate => :put,
16 :followers => :get,
17 :documents => :get,
18 :stratml => :get,
19 :ignorers => :get,
20 :following => :get,
21 :ignoring => :get,
22 :follow => :post,
23 :unfollow => :post,
24 :make_admin => :put,
25 :ads => :get,
26 :priorities => :get,
27 :signups => :get,
28 :legislators => :get,
29 :legislators_save => :post,
30 :endorse => :post,
31 :reset_password => :get,
32 :resend_activation => :get } do |users|
33 users.resources :messages
34 users.resources :followings, :collection => { :multiple => :put }
35 users.resources :contacts, :controller => :user_contacts, :as => "contacts", :collection => {
36 :multiple => :put,
37 :following => :get,
38 :members => :get,
39 :not_invited => :get,
40 :invited => :get
41 }
42 end
43
44 map.resources :settings, :collection => {
45 :signups => :get,
46 :picture => :get,
47 :picture_save => :post,
48 :legislators => :get,
49 :legislators_save => :post,
2865470 Jim Gilliam prompts a person to select a branch if they haven't already
authored
50 :branch_change => :get,
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
51 :delete => :get
52 }
53
54 map.resources :priorities,
55 :member => {
56 :flag_inappropriate => :put,
57 :bury => :put,
58 :compromised => :put,
59 :successful => :put,
60 :failed => :put,
61 :intheworks => :put,
62 :endorse => :post,
63 :endorsed => :get,
64 :opposed => :get,
65 :activities => :get,
66 :endorsers => :get,
67 :opposers => :get,
68 :discussions => :get,
47c1c30 Jim Gilliam you can make a twitter suitable short url for priorities now. uses http...
authored
69 :create_short_url => :put,
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
70 :tag => :post,
71 :tag_save => :put,
72 :points => :get,
66ba002 Jim Gilliam follow/unfollow individual discussions. your discussions, and notificat...
authored
73 :opposer_points => :get, :endorser_points => :get, :neutral_points => :get, :everyone_points => :get,
74 :opposer_documents => :get, :endorser_documents => :get, :neutral_documents => :get, :everyone_documents => :get,
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
75 :comments => :get,
76 :documents => :get },
77 :collection => {
78 :yours => :get,
79 :yours_finished => :get,
80 :yours_top => :get,
81 :yours_ads => :get,
82 :yours_lowest => :get,
83 :yours_created => :get,
84 :network => :get,
85 :consider => :get,
66ba002 Jim Gilliam follow/unfollow individual discussions. your discussions, and notificat...
authored
86 :obama => :get, :not_obama => :get, :obama_opposed => :get,
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
87 :finished => :get,
88 :ads => :get,
89 :top => :get,
90 :rising => :get,
91 :falling => :get,
92 :controversial => :get,
93 :random => :get,
94 :newest => :get,
95 :untagged => :get } do |priorities|
96 priorities.resources :changes, :member => { :start => :put, :stop => :put, :approve => :put, :flip => :put, :activities => :get } do |changes|
97 changes.resources :votes
98 end
99 priorities.resources :points
100 priorities.resources :documents
101 priorities.resources :ads, :collection => {:preview => :post}, :member => {:skip => :post}
102 end
103 map.resources :activities, :member => { :undelete => :put, :unhide => :get } do |activities|
66ba002 Jim Gilliam follow/unfollow individual discussions. your discussions, and notificat...
authored
104 activities.resources :followings, :controller => :following_discussions, :as => "followings"
105 activities.resources :comments,
106 :collection => { :more => :get },
107 :member => { :unhide => :get, :flag => :get, :not_abusive => :post, :abusive => :post }
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
108 end
109 map.resources :points,
66ba002 Jim Gilliam follow/unfollow individual discussions. your discussions, and notificat...
authored
110 :member => { :activity => :get,
111 :discussions => :get,
112 :quality => :post,
113 :unquality => :post,
114 :unhide => :get },
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
115 :collection => { :newest => :get, :revised => :get, :your_priorities => :get } do |points|
116 points.resources :revisions, :member => {:clean => :get}
117 end
118 map.resources :documents,
66ba002 Jim Gilliam follow/unfollow individual discussions. your discussions, and notificat...
authored
119 :member => { :activity => :get,
120 :discussions => :get, :quality => :post, :unquality => :post, :unhide => :get },
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
121 :collection => { :newest => :get, :revised => :get, :your_priorities => :get } do |documents|
66ba002 Jim Gilliam follow/unfollow individual discussions. your discussions, and notificat...
authored
122 documents.resources :revisions, :controller => :document_revisions, :as => "revisions",
123 :member => {:clean => :get}
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
124 end
125 map.resources :legislators, :member => { :priorities => :get } do |legislators|
126 legislators.resources :constituents, :collection => { :priorities => :get }
127 end
128 map.resources :blurbs, :collection => {:preview => :put}
129 map.resources :email_templates, :collection => {:preview => :put}
130 map.resources :color_schemes, :collection => {:preview => :put}
e8b081b Jim Gilliam looks like windows contacts, yahoo contacts, and facebook integration ar...
authored
131 map.resources :governments, :member => {:apis => :get}
be38a81 Jim Gilliam priority widget
authored
132 map.resources :widgets, :collection => {:priorities => :get, :discussions => :get, :points => :get, :preview_iframe => :get, :preview => :post}
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
133 map.resources :bulletins, :member => {:add_inline => :post}
bdbf211 Jim Gilliam most of the guts for branches of government. still some polishing to do...
authored
134 map.resources :branches, :member => {:default => :post} do |branches|
135 branches.resources :priorities, :controller => :branch_priorities, :as => "priorities",
451c6e2 Jim Gilliam separate page for finished branch priorities, remove from the main listi...
authored
136 :collection => { :top => :get, :rising => :get, :falling => :get, :controversial => :get, :random => :get, :newest => :get, :finished => :get}
bdbf211 Jim Gilliam most of the guts for branches of government. still some polishing to do...
authored
137 branches.resources :users, :controller => :branch_users, :as => "users",
138 :collection => { :talkative => :get, :twitterers => :get, :newest => :get, :ambassadors => :get}
139 end
8340365 Jim Gilliam consolidated priority/points/documents search all into one interface
authored
140 map.resources :searches, :collection => {:points => :get, :documents => :get}
e8b081b Jim Gilliam looks like windows contacts, yahoo contacts, and facebook integration ar...
authored
141 map.resources :signups, :endorsements, :passwords, :unsubscribes, :notifications, :pages, :about, :tags
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
142 map.resource :session
153504f Jim Gilliam added /delayed_jobs view
authored
143 map.resources :delayed_jobs, :member => {:top => :get, :clear => :get}
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
144
145 # The priority is based upon order of creation: first created -> highest priority.
146
147 # Sample of regular route:
148 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
149 # Keep in mind you can assign values other than :controller and :action
150
151 # Sample of named route:
152 # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
153 # This route can be invoked with purchase_url(:id => product.id)
154
155 # Sample resource route (maps HTTP verbs to controller actions automatically):
156 # map.resources :products
157
158 # Sample resource route with options:
159 # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
160
161 # Sample resource route with sub-resources:
162 # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
163
164 # Sample resource route within a namespace:
165 # map.namespace :admin do |admin|
166 # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
167 # admin.resources :products
168 # end
169
170 # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
171 map.root :controller => "priorities"
172
173 # restful_authentication routes
174 map.activate '/activate/:activation_code', :controller => 'users', :action => 'activate', :activation_code => nil
175 map.signup '/signup', :controller => 'users', :action => 'new'
176 map.login '/login', :controller => 'sessions', :action => 'new'
177 map.logout '/logout', :controller => 'sessions', :action => 'destroy'
178 map.unsubscribe '/unsubscribe', :controller => 'unsubscribes', :action => 'new'
179
180 # non restful routes
181 map.connect '/yours', :controller => 'priorities', :action => 'yours'
182 map.connect '/hot', :controller => 'priorities', :action => 'hot'
183 map.connect '/cold', :controller => 'priorities', :action => 'cold'
184 map.connect '/new', :controller => 'priorities', :action => 'new'
185 map.connect '/controversial', :controller => 'priorities', :action => 'controversial'
186
187 map.connect '/vote/:action/:code', :controller => "vote"
188 map.connect '/splash', :controller => 'splash', :action => 'index'
189 map.connect '/issues', :controller => "issues"
190 map.connect '/issues.:format', :controller => "issues"
9cea0d9 Jim Gilliam tags use commas as delimiters, and you can now specify a 'prompt' for ea...
authored
191 map.connect '/issues/:slug', :controller => "issues", :action => "show"
192 map.connect '/issues/:slug.:format', :controller => "issues", :action => "show"
193 map.connect '/issues/:slug/:action', :controller => "issues"
194 map.connect '/issues/:slug/:action.:format', :controller => "issues"
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
195
196 # See how all your routes lay out with "rake routes"
197
198 # Install the default routes as the lowest priority.
b1b6451 Jim Gilliam /pictures respects the appropriate government
authored
199 map.connect '/pictures/:short_name/:action/:id', :controller => "pictures"
4b8af4f Jim Gilliam first commit of entire nationbuilder app
authored
200 map.connect ':controller'
201 map.connect ':controller/:action'
202 map.connect ':controller/:action.:format' # this one is not needed for rails 2.3.2, and must be removed
203 map.connect ':controller/:action/:id'
204 map.connect ':controller/:action/:id.:format'
205 end
Something went wrong with that request. Please try again.