Description:
fix destroy for user and problem
(grafted from 56e542ecc72e8d85b776f34c64fe90d3ea4ae9e9)
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r656:970cebee99d6 - - 2 files changed: 5 inserted, 6 deleted
@@ -11,11 +11,10 | |||||
|
11 | end |
|
11 | end |
|
12 |
|
12 | ||
|
13 | # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) |
|
13 | # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) |
|
14 |
- verify :method => :post, :only => [ : |
|
14 | + verify :method => :post, :only => [ :create, :quick_create, |
|
15 | - :create, :quick_create, |
|
||
|
16 | :do_manage, |
|
15 | :do_manage, |
|
17 | :do_import, |
|
16 | :do_import, |
|
18 |
- |
|
17 | + ], |
|
19 | :redirect_to => { :action => :index } |
|
18 | :redirect_to => { :action => :index } |
|
20 |
|
19 | ||
|
21 | def show |
|
20 | def show |
@@ -115,8 +114,8 | |||||
|
115 | end |
|
114 | end |
|
116 |
|
115 | ||
|
117 | def destroy |
|
116 | def destroy |
|
118 | - Problem.find(params[:id]).destroy |
|
117 | + p = Problem.find(params[:id]).destroy |
|
119 |
- |
|
118 | + redirect_to action: :index |
|
120 | end |
|
119 | end |
|
121 |
|
120 | ||
|
122 | def toggle |
|
121 | def toggle |
@@ -7,7 +7,7 | |||||
|
7 | before_filter :admin_authorization |
|
7 | before_filter :admin_authorization |
|
8 |
|
8 | ||
|
9 | # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) |
|
9 | # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) |
|
10 |
- verify :method => :post, :only => [ |
|
10 | + verify :method => :post, :only => [ |
|
11 | :create, :create_from_list, |
|
11 | :create, :create_from_list, |
|
12 | :update, |
|
12 | :update, |
|
13 | :manage_contest, |
|
13 | :manage_contest, |
You need to be logged in to leave comments.
Login now