Description:
fix destroy for user and problem
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r605:1317cbdbc3df - - 2 files changed: 3 inserted, 4 deleted
@@ -8,14 +8,13 | |||
|
8 | 8 | |
|
9 | 9 | def index |
|
10 | 10 | @problems = Problem.find(:all, :order => 'date_added DESC') |
|
11 | 11 | end |
|
12 | 12 | |
|
13 | 13 | # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) |
|
14 |
- verify :method => :post, :only => [ : |
|
|
15 | - :create, :quick_create, | |
|
14 | + verify :method => :post, :only => [ :create, :quick_create, | |
|
16 | 15 | :do_manage, |
|
17 | 16 | :do_import, |
|
18 | 17 |
|
|
19 | 18 | :redirect_to => { :action => :index } |
|
20 | 19 | |
|
21 | 20 | def show |
@@ -112,13 +111,13 | |||
|
112 | 111 | else |
|
113 | 112 | render :action => 'edit' |
|
114 | 113 | end |
|
115 | 114 | end |
|
116 | 115 | |
|
117 | 116 | def destroy |
|
118 | - Problem.find(params[:id]).destroy | |
|
117 | + p = Problem.find(params[:id]).destroy | |
|
119 | 118 |
|
|
120 | 119 | end |
|
121 | 120 | |
|
122 | 121 | def toggle |
|
123 | 122 | @problem = Problem.find(params[:id]) |
|
124 | 123 | @problem.update_attributes(available: !(@problem.available) ) |
@@ -4,13 +4,13 | |||
|
4 | 4 | |
|
5 | 5 | include MailHelperMethods |
|
6 | 6 | |
|
7 | 7 | before_filter :admin_authorization |
|
8 | 8 | |
|
9 | 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 | 11 | :create, :create_from_list, |
|
12 | 12 | :update, |
|
13 | 13 | :manage_contest, |
|
14 | 14 | :bulk_mail |
|
15 | 15 | ], |
|
16 | 16 | :redirect_to => { :action => :list } |
You need to be logged in to leave comments.
Login now