##// END OF EJS Templates
Use named routes in controllers....
Jean-Philippe Lang -
r10752:0b9609468094
parent child
Show More
@@ -0,0 +1,326
1 home / welcome#index
2 signin GET|POST /login(.:format) account#login
3 signout GET|POST /logout(.:format) account#logout
4 register GET|POST /account/register(.:format) account#register
5 lost_password GET|POST /account/lost_password(.:format) account#lost_password
6 account_activate GET /account/activate(.:format) account#activate
7 preview_news GET|POST /news/preview(.:format) previews#news
8 preview_new_issue GET|POST /issues/preview/new/:project_id(.:format) previews#issue
9 preview_edit_issue GET|POST /issues/preview/edit/:id(.:format) previews#issue
10 preview_issue GET|POST /issues/preview(.:format) previews#issue
11 POST /projects/:id/wiki(.:format) wikis#edit
12 GET|POST /projects/:id/wiki/destroy(.:format) wikis#destroy
13 GET|POST /boards/:board_id/topics/new(.:format) messages#new
14 board_message GET /boards/:board_id/topics/:id(.:format) messages#show
15 GET|POST /boards/:board_id/topics/quote/:id(.:format) messages#quote
16 GET /boards/:board_id/topics/:id/edit(.:format) messages#edit
17 POST /boards/:board_id/topics/preview(.:format) messages#preview
18 POST /boards/:board_id/topics/:id/replies(.:format) messages#reply
19 POST /boards/:board_id/topics/:id/edit(.:format) messages#edit
20 POST /boards/:board_id/topics/:id/destroy(.:format) messages#destroy
21 auto_complete_issues GET /issues/auto_complete(.:format) auto_completes#issues
22 issues_context_menu GET|POST /issues/context_menu(.:format) context_menus#issues
23 issue_changes GET /issues/changes(.:format) journals#index
24 quoted_issue POST /issues/:id/quoted(.:format) journals#new {:id=>/\d+/}
25 GET /journals/diff/:id(.:format) journals#diff {:id=>/\d+/}
26 GET|POST /journals/edit/:id(.:format) journals#edit {:id=>/\d+/}
27 GET /projects/:project_id/issues/gantt(.:format) gantts#show
28 issues_gantt GET /issues/gantt(.:format) gantts#show
29 GET /projects/:project_id/issues/calendar(.:format) calendars#show
30 issues_calendar GET /issues/calendar(.:format) calendars#show
31 GET /projects/:id/issues/report(.:format) reports#issue_report
32 GET /projects/:id/issues/report/:detail(.:format) reports#issue_report_details
33 my_account GET|POST /my/account(.:format) my#account
34 my_account_destroy GET|POST /my/account/destroy(.:format) my#destroy
35 my_page GET /my/page(.:format) my#page
36 my GET /my(.:format) my#index
37 my_reset_rss_key POST /my/reset_rss_key(.:format) my#reset_rss_key
38 my_reset_api_key POST /my/reset_api_key(.:format) my#reset_api_key
39 my_password GET|POST /my/password(.:format) my#password
40 my_page_layout GET /my/page_layout(.:format) my#page_layout
41 my_add_block POST /my/add_block(.:format) my#add_block
42 my_remove_block POST /my/remove_block(.:format) my#remove_block
43 my_order_blocks POST /my/order_blocks(.:format) my#order_blocks
44 users GET /users(.:format) users#index
45 POST /users(.:format) users#create
46 new_user GET /users/new(.:format) users#new
47 edit_user GET /users/:id/edit(.:format) users#edit
48 user GET /users/:id(.:format) users#show
49 PUT /users/:id(.:format) users#update
50 DELETE /users/:id(.:format) users#destroy
51 user_membership PUT /users/:id/memberships/:membership_id(.:format) users#edit_membership
52 DELETE /users/:id/memberships/:membership_id(.:format) users#destroy_membership
53 user_memberships POST /users/:id/memberships(.:format) users#edit_membership
54 watchers_new GET /watchers/new(.:format) watchers#new
55 watchers POST /watchers(.:format) watchers#create
56 watchers_append POST /watchers/append(.:format) watchers#append
57 watchers_destroy POST /watchers/destroy(.:format) watchers#destroy
58 watchers_watch POST /watchers/watch(.:format) watchers#watch
59 watchers_unwatch POST /watchers/unwatch(.:format) watchers#unwatch
60 watchers_autocomplete_for_user GET /watchers/autocomplete_for_user(.:format) watchers#autocomplete_for_user
61 GET /projects/:id/settings/:tab(.:format) projects#settings
62 settings_project GET /projects/:id/settings(.:format) projects#settings
63 modules_project POST /projects/:id/modules(.:format) projects#modules
64 archive_project POST /projects/:id/archive(.:format) projects#archive
65 unarchive_project POST /projects/:id/unarchive(.:format) projects#unarchive
66 close_project POST /projects/:id/close(.:format) projects#close
67 reopen_project POST /projects/:id/reopen(.:format) projects#reopen
68 copy_project GET|POST /projects/:id/copy(.:format) projects#copy
69 autocomplete_project_memberships GET /projects/:project_id/memberships/autocomplete(.:format) members#autocomplete
70 project_memberships GET /projects/:project_id/memberships(.:format) members#index
71 POST /projects/:project_id/memberships(.:format) members#create
72 new_project_membership GET /projects/:project_id/memberships/new(.:format) members#new
73 membership GET /memberships/:id(.:format) members#show
74 PUT /memberships/:id(.:format) members#update
75 DELETE /memberships/:id(.:format) members#destroy
76 project_enumerations PUT /projects/:project_id/enumerations(.:format) project_enumerations#update
77 DELETE /projects/:project_id/enumerations(.:format) project_enumerations#destroy
78 GET /projects/:project_id/issues/:copy_from/copy(.:format) issues#new
79 report_project_issue_time_entries GET /projects/:project_id/issues/:issue_id/time_entries/report(.:format) timelog#report
80 project_issue_time_entries GET /projects/:project_id/issues/:issue_id/time_entries(.:format) timelog#index
81 POST /projects/:project_id/issues/:issue_id/time_entries(.:format) timelog#create
82 new_project_issue_time_entry GET /projects/:project_id/issues/:issue_id/time_entries/new(.:format) timelog#new
83 edit_project_issue_time_entry GET /projects/:project_id/issues/:issue_id/time_entries/:id/edit(.:format) timelog#edit
84 project_issue_time_entry GET /projects/:project_id/issues/:issue_id/time_entries/:id(.:format) timelog#show
85 PUT /projects/:project_id/issues/:issue_id/time_entries/:id(.:format) timelog#update
86 DELETE /projects/:project_id/issues/:issue_id/time_entries/:id(.:format) timelog#destroy
87 project_issues GET /projects/:project_id/issues(.:format) issues#index
88 POST /projects/:project_id/issues(.:format) issues#create
89 new_project_issue GET /projects/:project_id/issues/new(.:format) issues#new
90 project_issue_form PUT|POST /projects/:project_id/issues/new(.:format) issues#new
91 project_files GET /projects/:project_id/files(.:format) files#index
92 POST /projects/:project_id/files(.:format) files#create
93 new_project_file GET /projects/:project_id/files/new(.:format) files#new
94 close_completed_project_versions PUT /projects/:project_id/versions/close_completed(.:format) versions#close_completed
95 project_versions POST /projects/:project_id/versions(.:format) versions#create
96 new_project_version GET /projects/:project_id/versions/new(.:format) versions#new
97 GET /projects/:project_id/versions.:format versions#index
98 project_roadmap GET /projects/:project_id/roadmap versions#index
99 GET /projects/:project_id/versions(.:format) versions#index
100 project_news_index GET /projects/:project_id/news(.:format) news#index
101 POST /projects/:project_id/news(.:format) news#create
102 new_project_news GET /projects/:project_id/news/new(.:format) news#new
103 report_project_time_entries GET /projects/:project_id/time_entries/report(.:format) timelog#report
104 project_time_entries GET /projects/:project_id/time_entries(.:format) timelog#index
105 POST /projects/:project_id/time_entries(.:format) timelog#create
106 new_project_time_entry GET /projects/:project_id/time_entries/new(.:format) timelog#new
107 edit_project_time_entry GET /projects/:project_id/time_entries/:id/edit(.:format) timelog#edit
108 project_time_entry GET /projects/:project_id/time_entries/:id(.:format) timelog#show
109 PUT /projects/:project_id/time_entries/:id(.:format) timelog#update
110 DELETE /projects/:project_id/time_entries/:id(.:format) timelog#destroy
111 project_queries POST /projects/:project_id/queries(.:format) queries#create
112 new_project_query GET /projects/:project_id/queries/new(.:format) queries#new
113 project_issue_categories GET /projects/:project_id/issue_categories(.:format) issue_categories#index
114 POST /projects/:project_id/issue_categories(.:format) issue_categories#create
115 new_project_issue_category GET /projects/:project_id/issue_categories/new(.:format) issue_categories#new
116 edit_issue_category GET /issue_categories/:id/edit(.:format) issue_categories#edit
117 issue_category GET /issue_categories/:id(.:format) issue_categories#show
118 PUT /issue_categories/:id(.:format) issue_categories#update
119 DELETE /issue_categories/:id(.:format) issue_categories#destroy
120 project_documents GET /projects/:project_id/documents(.:format) documents#index
121 POST /projects/:project_id/documents(.:format) documents#create
122 new_project_document GET /projects/:project_id/documents/new(.:format) documents#new
123 project_boards GET /projects/:project_id/boards(.:format) boards#index
124 POST /projects/:project_id/boards(.:format) boards#create
125 new_project_board GET /projects/:project_id/boards/new(.:format) boards#new
126 edit_project_board GET /projects/:project_id/boards/:id/edit(.:format) boards#edit
127 project_board GET /projects/:project_id/boards/:id(.:format) boards#show
128 PUT /projects/:project_id/boards/:id(.:format) boards#update
129 DELETE /projects/:project_id/boards/:id(.:format) boards#destroy
130 committers_repository GET|POST /repositories/:id/committers(.:format) repositories#committers
131 project_repositories POST /projects/:project_id/repositories(.:format) repositories#create
132 new_project_repository GET /projects/:project_id/repositories/new(.:format) repositories#new
133 edit_repository GET /repositories/:id/edit(.:format) repositories#edit
134 repository PUT /repositories/:id(.:format) repositories#update
135 DELETE /repositories/:id(.:format) repositories#destroy
136 project_wiki_index GET /projects/:project_id/wiki/index(.:format) wiki#index
137 rename_project_wiki GET /projects/:project_id/wiki/:id/rename(.:format) wiki#rename
138 POST /projects/:project_id/wiki/:id/rename(.:format) wiki#rename
139 history_project_wiki GET /projects/:project_id/wiki/:id/history(.:format) wiki#history
140 diff_project_wiki GET /projects/:project_id/wiki/:id/diff(.:format) wiki#diff
141 preview_project_wiki POST|PUT /projects/:project_id/wiki/:id/preview(.:format) wiki#preview
142 protect_project_wiki POST /projects/:project_id/wiki/:id/protect(.:format) wiki#protect
143 add_attachment_project_wiki POST /projects/:project_id/wiki/:id/add_attachment(.:format) wiki#add_attachment
144 export_project_wiki_index GET /projects/:project_id/wiki/export(.:format) wiki#export
145 date_index_project_wiki_index GET /projects/:project_id/wiki/date_index(.:format) wiki#date_index
146 edit_project_wiki GET /projects/:project_id/wiki/:id/edit(.:format) wiki#edit
147 project_wiki GET /projects/:project_id/wiki/:id(.:format) wiki#show
148 PUT /projects/:project_id/wiki/:id(.:format) wiki#update
149 DELETE /projects/:project_id/wiki/:id(.:format) wiki#destroy
150 GET /projects/:project_id/wiki(.:format) wiki#show
151 GET /projects/:project_id/wiki/:id/:version(.:format) wiki#show
152 DELETE /projects/:project_id/wiki/:id/:version(.:format) wiki#destroy_version
153 GET /projects/:project_id/wiki/:id/:version/annotate(.:format) wiki#annotate
154 GET /projects/:project_id/wiki/:id/:version/diff(.:format) wiki#diff
155 projects GET /projects(.:format) projects#index
156 POST /projects(.:format) projects#create
157 new_project GET /projects/new(.:format) projects#new
158 edit_project GET /projects/:id/edit(.:format) projects#edit
159 project GET /projects/:id(.:format) projects#show
160 PUT /projects/:id(.:format) projects#update
161 DELETE /projects/:id(.:format) projects#destroy
162 bulk_edit_issues GET|POST /issues/bulk_edit(.:format) issues#bulk_edit
163 bulk_update_issues POST /issues/bulk_update(.:format) issues#bulk_update
164 report_issue_time_entries GET /issues/:issue_id/time_entries/report(.:format) timelog#report
165 issue_time_entries GET /issues/:issue_id/time_entries(.:format) timelog#index
166 POST /issues/:issue_id/time_entries(.:format) timelog#create
167 new_issue_time_entry GET /issues/:issue_id/time_entries/new(.:format) timelog#new
168 edit_issue_time_entry GET /issues/:issue_id/time_entries/:id/edit(.:format) timelog#edit
169 issue_time_entry GET /issues/:issue_id/time_entries/:id(.:format) timelog#show
170 PUT /issues/:issue_id/time_entries/:id(.:format) timelog#update
171 DELETE /issues/:issue_id/time_entries/:id(.:format) timelog#destroy
172 issue_relations GET /issues/:issue_id/relations(.:format) issue_relations#index
173 POST /issues/:issue_id/relations(.:format) issue_relations#create
174 relation GET /relations/:id(.:format) issue_relations#show
175 DELETE /relations/:id(.:format) issue_relations#destroy
176 issues GET /issues(.:format) issues#index
177 POST /issues(.:format) issues#create
178 new_issue GET /issues/new(.:format) issues#new
179 edit_issue GET /issues/:id/edit(.:format) issues#edit
180 issue GET /issues/:id(.:format) issues#show
181 PUT /issues/:id(.:format) issues#update
182 DELETE /issues/:id(.:format) issues#destroy
183 DELETE /issues(.:format) issues#destroy
184 queries GET /queries(.:format) queries#index
185 POST /queries(.:format) queries#create
186 new_query GET /queries/new(.:format) queries#new
187 edit_query GET /queries/:id/edit(.:format) queries#edit
188 query PUT /queries/:id(.:format) queries#update
189 DELETE /queries/:id(.:format) queries#destroy
190 news_index GET /news(.:format) news#index
191 edit_news GET /news/:id/edit(.:format) news#edit
192 news GET /news/:id(.:format) news#show
193 PUT /news/:id(.:format) news#update
194 DELETE /news/:id(.:format) news#destroy
195 POST /news/:id/comments(.:format) comments#create
196 DELETE /news/:id/comments/:comment_id(.:format) comments#destroy
197 status_by_version POST /versions/:id/status_by(.:format) versions#status_by
198 edit_version GET /versions/:id/edit(.:format) versions#edit
199 version GET /versions/:id(.:format) versions#show
200 PUT /versions/:id(.:format) versions#update
201 DELETE /versions/:id(.:format) versions#destroy
202 add_attachment_document POST /documents/:id/add_attachment(.:format) documents#add_attachment
203 edit_document GET /documents/:id/edit(.:format) documents#edit
204 document GET /documents/:id(.:format) documents#show
205 PUT /documents/:id(.:format) documents#update
206 DELETE /documents/:id(.:format) documents#destroy
207 time_entries_context_menu GET|POST /time_entries/context_menu(.:format) context_menus#time_entries
208 report_time_entries GET /time_entries/report(.:format) timelog#report
209 bulk_edit_time_entries GET /time_entries/bulk_edit(.:format) timelog#bulk_edit
210 bulk_update_time_entries POST /time_entries/bulk_update(.:format) timelog#bulk_update
211 time_entries GET /time_entries(.:format) timelog#index
212 POST /time_entries(.:format) timelog#create
213 new_time_entry GET /time_entries/new(.:format) timelog#new
214 edit_time_entry GET /time_entries/:id/edit(.:format) timelog#edit
215 time_entry GET /time_entries/:id(.:format) timelog#show
216 PUT /time_entries/:id(.:format) timelog#update
217 DELETE /time_entries/:id(.:format) timelog#destroy {:id=>/\d+/}
218 time_entries_destroy DELETE /time_entries/destroy(.:format) timelog#destroy
219 GET /projects/:id/settings/:tab(.:format) projects#settings
220 GET /projects/:id/activity(.:format) activities#index
221 GET /projects/:id/activity.:format activities#index
222 activity GET /activity(.:format) activities#index
223 GET /projects/:id/repository/:repository_id/statistics(.:format) repositories#stats
224 GET /projects/:id/repository/:repository_id/graph(.:format) repositories#graph
225 GET /projects/:id/repository/:repository_id/changes(/*path(.:ext))(.:format) repositories#changes
226 GET /projects/:id/repository/:repository_id/revisions/:rev(.:format) repositories#revision
227 GET /projects/:id/repository/:repository_id/revision(.:format) repositories#revision
228 POST /projects/:id/repository/:repository_id/revisions/:rev/issues(.:format) repositories#add_related_issue
229 DELETE /projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id(.:format) repositories#remove_related_issue
230 GET /projects/:id/repository/:repository_id/revisions(.:format) repositories#revisions
231 GET /projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext)) repositories#(?-mix:(browse|show|entry|raw|annotate|diff)) {:rev=>/[a-z0-9\.\-_]+/}
232 GET /projects/:id/repository/statistics(.:format) repositories#stats
233 GET /projects/:id/repository/graph(.:format) repositories#graph
234 GET /projects/:id/repository/changes(/*path(.:ext))(.:format) repositories#changes
235 GET /projects/:id/repository/revisions(.:format) repositories#revisions
236 GET /projects/:id/repository/revisions/:rev(.:format) repositories#revision
237 GET /projects/:id/repository/revision(.:format) repositories#revision
238 POST /projects/:id/repository/revisions/:rev/issues(.:format) repositories#add_related_issue
239 DELETE /projects/:id/repository/revisions/:rev/issues/:issue_id(.:format) repositories#remove_related_issue
240 GET /projects/:id/repository/revisions/:rev/:action(/*path(.:ext)) repositories#(?-mix:(browse|show|entry|raw|annotate|diff)) {:rev=>/[a-z0-9\.\-_]+/}
241 GET /projects/:id/repository/:repository_id/:action(/*path(.:ext))(.:format) repositories#(?-mix:(browse|show|entry|raw|changes|annotate|diff))
242 GET /projects/:id/repository/:action(/*path(.:ext))(.:format) repositories#(?-mix:(browse|show|entry|raw|changes|annotate|diff))
243 GET /projects/:id/repository/:repository_id(.:format) repositories#show
244 GET /projects/:id/repository(.:format) repositories#show
245 GET /attachments/:id/:filename(.:format) attachments#show {:id=>/\d+/, :filename=>/.*/}
246 GET /attachments/download/:id/:filename(.:format) attachments#download {:id=>/\d+/, :filename=>/.*/}
247 GET /attachments/download/:id(.:format) attachments#download {:id=>/\d+/}
248 GET /attachments/thumbnail/:id(/:size)(.:format) attachments#thumbnail {:id=>/\d+/, :size=>/\d+/}
249 attachment GET /attachments/:id(.:format) attachments#show
250 DELETE /attachments/:id(.:format) attachments#destroy
251 autocomplete_for_user_group GET /groups/:id/autocomplete_for_user(.:format) groups#autocomplete_for_user
252 groups GET /groups(.:format) groups#index
253 POST /groups(.:format) groups#create
254 new_group GET /groups/new(.:format) groups#new
255 edit_group GET /groups/:id/edit(.:format) groups#edit
256 group GET /groups/:id(.:format) groups#show
257 PUT /groups/:id(.:format) groups#update
258 DELETE /groups/:id(.:format) groups#destroy
259 group_users POST /groups/:id/users(.:format) groups#add_users {:id=>/\d+/}
260 group_user DELETE /groups/:id/users/:user_id(.:format) groups#remove_user {:id=>/\d+/}
261 POST /groups/destroy_membership/:id(.:format) groups#destroy_membership {:id=>/\d+/}
262 POST /groups/edit_membership/:id(.:format) groups#edit_membership {:id=>/\d+/}
263 fields_trackers GET|POST /trackers/fields(.:format) trackers#fields
264 trackers GET /trackers(.:format) trackers#index
265 POST /trackers(.:format) trackers#create
266 new_tracker GET /trackers/new(.:format) trackers#new
267 edit_tracker GET /trackers/:id/edit(.:format) trackers#edit
268 tracker PUT /trackers/:id(.:format) trackers#update
269 DELETE /trackers/:id(.:format) trackers#destroy
270 update_issue_done_ratio_issue_statuses POST /issue_statuses/update_issue_done_ratio(.:format) issue_statuses#update_issue_done_ratio
271 issue_statuses GET /issue_statuses(.:format) issue_statuses#index
272 POST /issue_statuses(.:format) issue_statuses#create
273 new_issue_status GET /issue_statuses/new(.:format) issue_statuses#new
274 edit_issue_status GET /issue_statuses/:id/edit(.:format) issue_statuses#edit
275 issue_status PUT /issue_statuses/:id(.:format) issue_statuses#update
276 DELETE /issue_statuses/:id(.:format) issue_statuses#destroy
277 custom_fields GET /custom_fields(.:format) custom_fields#index
278 POST /custom_fields(.:format) custom_fields#create
279 new_custom_field GET /custom_fields/new(.:format) custom_fields#new
280 edit_custom_field GET /custom_fields/:id/edit(.:format) custom_fields#edit
281 custom_field PUT /custom_fields/:id(.:format) custom_fields#update
282 DELETE /custom_fields/:id(.:format) custom_fields#destroy
283 permissions_roles GET|POST /roles/permissions(.:format) roles#permissions
284 roles GET /roles(.:format) roles#index
285 POST /roles(.:format) roles#create
286 new_role GET /roles/new(.:format) roles#new
287 edit_role GET /roles/:id/edit(.:format) roles#edit
288 role GET /roles/:id(.:format) roles#show
289 PUT /roles/:id(.:format) roles#update
290 DELETE /roles/:id(.:format) roles#destroy
291 enumerations GET /enumerations(.:format) enumerations#index
292 POST /enumerations(.:format) enumerations#create
293 new_enumeration GET /enumerations/new(.:format) enumerations#new
294 edit_enumeration GET /enumerations/:id/edit(.:format) enumerations#edit
295 enumeration PUT /enumerations/:id(.:format) enumerations#update
296 DELETE /enumerations/:id(.:format) enumerations#destroy
297 GET /enumerations/:type(.:format) enumerations#index
298 GET /projects/:id/search(.:format) search#index
299 search GET /search(.:format) search#index
300 mail_handler POST /mail_handler(.:format) mail_handler#index
301 admin GET /admin(.:format) admin#index
302 admin_projects GET /admin/projects(.:format) admin#projects
303 admin_plugins GET /admin/plugins(.:format) admin#plugins
304 admin_info GET /admin/info(.:format) admin#info
305 admin_test_email GET /admin/test_email(.:format) admin#test_email
306 admin_default_configuration POST /admin/default_configuration(.:format) admin#default_configuration
307 try_connection_auth_source GET /auth_sources/:id/test_connection(.:format) auth_sources#test_connection
308 auth_sources GET /auth_sources(.:format) auth_sources#index
309 POST /auth_sources(.:format) auth_sources#create
310 new_auth_source GET /auth_sources/new(.:format) auth_sources#new
311 edit_auth_source GET /auth_sources/:id/edit(.:format) auth_sources#edit
312 auth_source GET /auth_sources/:id(.:format) auth_sources#show
313 PUT /auth_sources/:id(.:format) auth_sources#update
314 DELETE /auth_sources/:id(.:format) auth_sources#destroy
315 workflows GET /workflows(.:format) workflows#index
316 workflows_edit GET|POST /workflows/edit(.:format) workflows#edit
317 workflows_permissions GET|POST /workflows/permissions(.:format) workflows#permissions
318 workflows_copy GET|POST /workflows/copy(.:format) workflows#copy
319 settings GET /settings(.:format) settings#index
320 settings_edit GET|POST /settings/edit(.:format) settings#edit
321 GET|POST /settings/plugin/:id(.:format) settings#plugin
322 sys_projects GET /sys/projects(.:format) sys#projects
323 POST /sys/projects/:id/repository(.:format) sys#create_project_repository
324 sys_fetch_changesets GET /sys/fetch_changesets(.:format) sys#fetch_changesets
325 uploads POST /uploads(.:format) attachments#upload
326 GET /robots.txt(.:format) welcome#robots
@@ -110,7 +110,7 class AccountController < ApplicationController
110 session[:auth_source_registration] = nil
110 session[:auth_source_registration] = nil
111 self.logged_user = @user
111 self.logged_user = @user
112 flash[:notice] = l(:notice_account_activated)
112 flash[:notice] = l(:notice_account_activated)
113 redirect_to :controller => 'my', :action => 'account'
113 redirect_to my_account_path
114 end
114 end
115 else
115 else
116 @user.login = params[:user][:login]
116 @user.login = params[:user][:login]
@@ -218,7 +218,7 class AccountController < ApplicationController
218 set_autologin_cookie(user)
218 set_autologin_cookie(user)
219 end
219 end
220 call_hook(:controller_account_success_authentication_after, {:user => user })
220 call_hook(:controller_account_success_authentication_after, {:user => user })
221 redirect_back_or_default :controller => 'my', :action => 'page'
221 redirect_back_or_default my_page_path
222 end
222 end
223
223
224 def set_autologin_cookie(user)
224 def set_autologin_cookie(user)
@@ -270,7 +270,7 class AccountController < ApplicationController
270 if user.save
270 if user.save
271 self.logged_user = user
271 self.logged_user = user
272 flash[:notice] = l(:notice_account_activated)
272 flash[:notice] = l(:notice_account_activated)
273 redirect_to :controller => 'my', :action => 'account'
273 redirect_to my_account_path
274 else
274 else
275 yield if block_given?
275 yield if block_given?
276 end
276 end
@@ -54,7 +54,7 class AdminController < ApplicationController
54 flash[:error] = l(:error_can_t_load_default_data, e.message)
54 flash[:error] = l(:error_can_t_load_default_data, e.message)
55 end
55 end
56 end
56 end
57 redirect_to :action => 'index'
57 redirect_to admin_path
58 end
58 end
59
59
60 def test_email
60 def test_email
@@ -68,7 +68,7 class AdminController < ApplicationController
68 flash[:error] = l(:notice_email_error, e.message)
68 flash[:error] = l(:notice_email_error, e.message)
69 end
69 end
70 ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
70 ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
71 redirect_to :controller => 'settings', :action => 'edit', :tab => 'notifications'
71 redirect_to settings_path(:tab => 'notifications')
72 end
72 end
73
73
74 def info
74 def info
@@ -34,7 +34,7 class AuthSourcesController < ApplicationController
34 @auth_source = AuthSource.new_subclass_instance(params[:type], params[:auth_source])
34 @auth_source = AuthSource.new_subclass_instance(params[:type], params[:auth_source])
35 if @auth_source.save
35 if @auth_source.save
36 flash[:notice] = l(:notice_successful_create)
36 flash[:notice] = l(:notice_successful_create)
37 redirect_to :action => 'index'
37 redirect_to auth_sources_path
38 else
38 else
39 render :action => 'new'
39 render :action => 'new'
40 end
40 end
@@ -48,7 +48,7 class AuthSourcesController < ApplicationController
48 @auth_source = AuthSource.find(params[:id])
48 @auth_source = AuthSource.find(params[:id])
49 if @auth_source.update_attributes(params[:auth_source])
49 if @auth_source.update_attributes(params[:auth_source])
50 flash[:notice] = l(:notice_successful_update)
50 flash[:notice] = l(:notice_successful_update)
51 redirect_to :action => 'index'
51 redirect_to auth_sources_path
52 else
52 else
53 render :action => 'edit'
53 render :action => 'edit'
54 end
54 end
@@ -62,7 +62,7 class AuthSourcesController < ApplicationController
62 rescue Exception => e
62 rescue Exception => e
63 flash[:error] = l(:error_unable_to_connect, e.message)
63 flash[:error] = l(:error_unable_to_connect, e.message)
64 end
64 end
65 redirect_to :action => 'index'
65 redirect_to auth_sources_path
66 end
66 end
67
67
68 def destroy
68 def destroy
@@ -71,6 +71,6 class AuthSourcesController < ApplicationController
71 @auth_source.destroy
71 @auth_source.destroy
72 flash[:notice] = l(:notice_successful_delete)
72 flash[:notice] = l(:notice_successful_delete)
73 end
73 end
74 redirect_to :action => 'index'
74 redirect_to auth_sources_path
75 end
75 end
76 end
76 end
@@ -99,7 +99,7 class BoardsController < ApplicationController
99
99
100 private
100 private
101 def redirect_to_settings_in_projects
101 def redirect_to_settings_in_projects
102 redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'
102 redirect_to settings_project_path(@project, :tab => 'boards')
103 end
103 end
104
104
105 def find_board_if_available
105 def find_board_if_available
@@ -32,12 +32,12 class CommentsController < ApplicationController
32 flash[:notice] = l(:label_comment_added)
32 flash[:notice] = l(:label_comment_added)
33 end
33 end
34
34
35 redirect_to :controller => 'news', :action => 'show', :id => @news
35 redirect_to news_path(@news)
36 end
36 end
37
37
38 def destroy
38 def destroy
39 @news.comments.find(params[:comment_id]).destroy
39 @news.comments.find(params[:comment_id]).destroy
40 redirect_to :controller => 'news', :action => 'show', :id => @news
40 redirect_to news_path(@news)
41 end
41 end
42
42
43 private
43 private
@@ -34,7 +34,7 class CustomFieldsController < ApplicationController
34 if request.post? and @custom_field.save
34 if request.post? and @custom_field.save
35 flash[:notice] = l(:notice_successful_create)
35 flash[:notice] = l(:notice_successful_create)
36 call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
36 call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
37 redirect_to :action => 'index', :tab => @custom_field.class.name
37 redirect_to custom_fields_path(:tab => @custom_field.class.name)
38 else
38 else
39 render :action => 'new'
39 render :action => 'new'
40 end
40 end
@@ -47,7 +47,7 class CustomFieldsController < ApplicationController
47 if request.put? and @custom_field.update_attributes(params[:custom_field])
47 if request.put? and @custom_field.update_attributes(params[:custom_field])
48 flash[:notice] = l(:notice_successful_update)
48 flash[:notice] = l(:notice_successful_update)
49 call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)
49 call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)
50 redirect_to :action => 'index', :tab => @custom_field.class.name
50 redirect_to custom_fields_path(:tab => @custom_field.class.name)
51 else
51 else
52 render :action => 'edit'
52 render :action => 'edit'
53 end
53 end
@@ -55,10 +55,10 class CustomFieldsController < ApplicationController
55
55
56 def destroy
56 def destroy
57 @custom_field.destroy
57 @custom_field.destroy
58 redirect_to :action => 'index', :tab => @custom_field.class.name
58 redirect_to custom_fields_path(:tab => @custom_field.class.name)
59 rescue
59 rescue
60 flash[:error] = l(:error_can_not_delete_custom_field)
60 flash[:error] = l(:error_can_not_delete_custom_field)
61 redirect_to :action => 'index'
61 redirect_to custom_fields_path(:tab => @custom_field.class.name)
62 end
62 end
63
63
64 private
64 private
@@ -58,7 +58,7 class DocumentsController < ApplicationController
58 if @document.save
58 if @document.save
59 render_attachment_warning_if_needed(@document)
59 render_attachment_warning_if_needed(@document)
60 flash[:notice] = l(:notice_successful_create)
60 flash[:notice] = l(:notice_successful_create)
61 redirect_to :action => 'index', :project_id => @project
61 redirect_to project_documents_path(@project)
62 else
62 else
63 render :action => 'new'
63 render :action => 'new'
64 end
64 end
@@ -71,7 +71,7 class DocumentsController < ApplicationController
71 @document.safe_attributes = params[:document]
71 @document.safe_attributes = params[:document]
72 if request.put? and @document.save
72 if request.put? and @document.save
73 flash[:notice] = l(:notice_successful_update)
73 flash[:notice] = l(:notice_successful_update)
74 redirect_to :action => 'show', :id => @document
74 redirect_to document_path(@document)
75 else
75 else
76 render :action => 'edit'
76 render :action => 'edit'
77 end
77 end
@@ -79,7 +79,7 class DocumentsController < ApplicationController
79
79
80 def destroy
80 def destroy
81 @document.destroy if request.delete?
81 @document.destroy if request.delete?
82 redirect_to :controller => 'documents', :action => 'index', :project_id => @project
82 redirect_to project_documents_path(@project)
83 end
83 end
84
84
85 def add_attachment
85 def add_attachment
@@ -89,6 +89,6 class DocumentsController < ApplicationController
89 if attachments.present? && attachments[:files].present? && Setting.notified_events.include?('document_added')
89 if attachments.present? && attachments[:files].present? && Setting.notified_events.include?('document_added')
90 Mailer.attachments_added(attachments[:files]).deliver
90 Mailer.attachments_added(attachments[:files]).deliver
91 end
91 end
92 redirect_to :action => 'show', :id => @document
92 redirect_to document_path(@document)
93 end
93 end
94 end
94 end
@@ -46,7 +46,7 class EnumerationsController < ApplicationController
46 def create
46 def create
47 if request.post? && @enumeration.save
47 if request.post? && @enumeration.save
48 flash[:notice] = l(:notice_successful_create)
48 flash[:notice] = l(:notice_successful_create)
49 redirect_to :action => 'index'
49 redirect_to enumerations_path
50 else
50 else
51 render :action => 'new'
51 render :action => 'new'
52 end
52 end
@@ -58,7 +58,7 class EnumerationsController < ApplicationController
58 def update
58 def update
59 if request.put? && @enumeration.update_attributes(params[:enumeration])
59 if request.put? && @enumeration.update_attributes(params[:enumeration])
60 flash[:notice] = l(:notice_successful_update)
60 flash[:notice] = l(:notice_successful_update)
61 redirect_to :action => 'index'
61 redirect_to enumerations_path
62 else
62 else
63 render :action => 'edit'
63 render :action => 'edit'
64 end
64 end
@@ -68,12 +68,12 class EnumerationsController < ApplicationController
68 if !@enumeration.in_use?
68 if !@enumeration.in_use?
69 # No associated objects
69 # No associated objects
70 @enumeration.destroy
70 @enumeration.destroy
71 redirect_to :action => 'index'
71 redirect_to enumerations_path
72 return
72 return
73 elsif params[:reassign_to_id]
73 elsif params[:reassign_to_id]
74 if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id])
74 if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id])
75 @enumeration.destroy(reassign_to)
75 @enumeration.destroy(reassign_to)
76 redirect_to :action => 'index'
76 redirect_to enumerations_path
77 return
77 return
78 end
78 end
79 end
79 end
@@ -84,7 +84,7 class GroupsController < ApplicationController
84 @group.destroy
84 @group.destroy
85
85
86 respond_to do |format|
86 respond_to do |format|
87 format.html { redirect_to(groups_url) }
87 format.html { redirect_to(groups_path) }
88 format.api { render_api_ok }
88 format.api { render_api_ok }
89 end
89 end
90 end
90 end
@@ -93,7 +93,7 class GroupsController < ApplicationController
93 @users = User.find_all_by_id(params[:user_id] || params[:user_ids])
93 @users = User.find_all_by_id(params[:user_id] || params[:user_ids])
94 @group.users << @users if request.post?
94 @group.users << @users if request.post?
95 respond_to do |format|
95 respond_to do |format|
96 format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
96 format.html { redirect_to edit_group_path(@group, :tab => 'users') }
97 format.js
97 format.js
98 format.api { render_api_ok }
98 format.api { render_api_ok }
99 end
99 end
@@ -102,7 +102,7 class GroupsController < ApplicationController
102 def remove_user
102 def remove_user
103 @group.users.delete(User.find(params[:user_id])) if request.delete?
103 @group.users.delete(User.find(params[:user_id])) if request.delete?
104 respond_to do |format|
104 respond_to do |format|
105 format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
105 format.html { redirect_to edit_group_path(@group, :tab => 'users') }
106 format.js
106 format.js
107 format.api { render_api_ok }
107 format.api { render_api_ok }
108 end
108 end
@@ -117,7 +117,7 class GroupsController < ApplicationController
117 @membership = Member.edit_membership(params[:membership_id], params[:membership], @group)
117 @membership = Member.edit_membership(params[:membership_id], params[:membership], @group)
118 @membership.save if request.post?
118 @membership.save if request.post?
119 respond_to do |format|
119 respond_to do |format|
120 format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
120 format.html { redirect_to edit_group_path(@group, :tab => 'memberships') }
121 format.js
121 format.js
122 end
122 end
123 end
123 end
@@ -125,7 +125,7 class GroupsController < ApplicationController
125 def destroy_membership
125 def destroy_membership
126 Member.find(params[:membership_id]).destroy if request.post?
126 Member.find(params[:membership_id]).destroy if request.post?
127 respond_to do |format|
127 respond_to do |format|
128 format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
128 format.html { redirect_to edit_group_path(@group, :tab => 'memberships') }
129 format.js
129 format.js
130 end
130 end
131 end
131 end
@@ -26,14 +26,14 class IssueCategoriesController < ApplicationController
26
26
27 def index
27 def index
28 respond_to do |format|
28 respond_to do |format|
29 format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project }
29 format.html { redirect_to_settings_in_projects }
30 format.api { @categories = @project.issue_categories.all }
30 format.api { @categories = @project.issue_categories.all }
31 end
31 end
32 end
32 end
33
33
34 def show
34 def show
35 respond_to do |format|
35 respond_to do |format|
36 format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project }
36 format.html { redirect_to_settings_in_projects }
37 format.api
37 format.api
38 end
38 end
39 end
39 end
@@ -55,7 +55,7 class IssueCategoriesController < ApplicationController
55 respond_to do |format|
55 respond_to do |format|
56 format.html do
56 format.html do
57 flash[:notice] = l(:notice_successful_create)
57 flash[:notice] = l(:notice_successful_create)
58 redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
58 redirect_to_settings_in_projects
59 end
59 end
60 format.js
60 format.js
61 format.api { render :action => 'show', :status => :created, :location => issue_category_path(@category) }
61 format.api { render :action => 'show', :status => :created, :location => issue_category_path(@category) }
@@ -78,7 +78,7 class IssueCategoriesController < ApplicationController
78 respond_to do |format|
78 respond_to do |format|
79 format.html {
79 format.html {
80 flash[:notice] = l(:notice_successful_update)
80 flash[:notice] = l(:notice_successful_update)
81 redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
81 redirect_to_settings_in_projects
82 }
82 }
83 format.api { render_api_ok }
83 format.api { render_api_ok }
84 end
84 end
@@ -99,7 +99,7 class IssueCategoriesController < ApplicationController
99 end
99 end
100 @category.destroy(reassign_to)
100 @category.destroy(reassign_to)
101 respond_to do |format|
101 respond_to do |format|
102 format.html { redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories' }
102 format.html { redirect_to_settings_in_projects }
103 format.api { render_api_ok }
103 format.api { render_api_ok }
104 end
104 end
105 return
105 return
@@ -107,7 +107,12 class IssueCategoriesController < ApplicationController
107 @categories = @project.issue_categories - [@category]
107 @categories = @project.issue_categories - [@category]
108 end
108 end
109
109
110 private
110 private
111
112 def redirect_to_settings_in_projects
113 redirect_to settings_project_path(@project, :tab => 'categories')
114 end
115
111 # Wrap ApplicationController's find_model_object method to set
116 # Wrap ApplicationController's find_model_object method to set
112 # @category instead of just @issue_category
117 # @category instead of just @issue_category
113 def find_model_object
118 def find_model_object
@@ -48,7 +48,7 class IssueRelationsController < ApplicationController
48 saved = @relation.save
48 saved = @relation.save
49
49
50 respond_to do |format|
50 respond_to do |format|
51 format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue }
51 format.html { redirect_to issue_path(@issue) }
52 format.js {
52 format.js {
53 @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
53 @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
54 }
54 }
@@ -67,7 +67,7 class IssueRelationsController < ApplicationController
67 @relation.destroy
67 @relation.destroy
68
68
69 respond_to do |format|
69 respond_to do |format|
70 format.html { redirect_to issue_path } # TODO : does this really work since @issue is always nil? What is it useful to?
70 format.html { redirect_to issue_path(@relation.issue_from) }
71 format.js
71 format.js
72 format.api { render_api_ok }
72 format.api { render_api_ok }
73 end
73 end
@@ -90,7 +90,7 class AdminControllerTest < ActionController::TestCase
90 ActionMailer::Base.deliveries.clear
90 ActionMailer::Base.deliveries.clear
91
91
92 get :test_email
92 get :test_email
93 assert_redirected_to '/settings/edit?tab=notifications'
93 assert_redirected_to '/settings?tab=notifications'
94 mail = ActionMailer::Base.deliveries.last
94 mail = ActionMailer::Base.deliveries.last
95 assert_not_nil mail
95 assert_not_nil mail
96 user = User.find(1)
96 user = User.find(1)
@@ -100,7 +100,7 class AdminControllerTest < ActionController::TestCase
100 def test_test_email_failure_should_display_the_error
100 def test_test_email_failure_should_display_the_error
101 Mailer.stubs(:test_email).raises(Exception, 'Some error message')
101 Mailer.stubs(:test_email).raises(Exception, 'Some error message')
102 get :test_email
102 get :test_email
103 assert_redirected_to '/settings/edit?tab=notifications'
103 assert_redirected_to '/settings?tab=notifications'
104 assert_match /Some error message/, flash[:error]
104 assert_match /Some error message/, flash[:error]
105 end
105 end
106
106
General Comments 0
You need to be logged in to leave comments. Login now