@@ -1,16 +1,16 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
6 | # as published by the Free Software Foundation; either version 2 |
|
6 | # as published by the Free Software Foundation; either version 2 | |
7 | # of the License, or (at your option) any later version. |
|
7 | # of the License, or (at your option) any later version. | |
8 |
# |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 |
# |
|
13 | # | |
14 | # You should have received a copy of the GNU General Public License |
|
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software |
|
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
@@ -22,7 +22,7 class IssueCategoriesController < ApplicationController | |||||
22 | before_filter :find_project_from_association, :except => :new |
|
22 | before_filter :find_project_from_association, :except => :new | |
23 | before_filter :find_project, :only => :new |
|
23 | before_filter :find_project, :only => :new | |
24 | before_filter :authorize |
|
24 | before_filter :authorize | |
25 |
|
25 | |||
26 | verify :method => :post, :only => :destroy |
|
26 | verify :method => :post, :only => :destroy | |
27 |
|
27 | |||
28 | def new |
|
28 | def new | |
@@ -51,7 +51,7 class IssueCategoriesController < ApplicationController | |||||
51 | end |
|
51 | end | |
52 | end |
|
52 | end | |
53 | end |
|
53 | end | |
54 |
|
54 | |||
55 | def edit |
|
55 | def edit | |
56 | if request.post? and @category.update_attributes(params[:category]) |
|
56 | if request.post? and @category.update_attributes(params[:category]) | |
57 | flash[:notice] = l(:notice_successful_update) |
|
57 | flash[:notice] = l(:notice_successful_update) | |
@@ -81,8 +81,8 private | |||||
81 | def find_model_object |
|
81 | def find_model_object | |
82 | super |
|
82 | super | |
83 | @category = @object |
|
83 | @category = @object | |
84 |
end |
|
84 | end | |
85 |
|
85 | |||
86 | def find_project |
|
86 | def find_project | |
87 | @project = Project.find(params[:project_id]) |
|
87 | @project = Project.find(params[:project_id]) | |
88 | rescue ActiveRecord::RecordNotFound |
|
88 | rescue ActiveRecord::RecordNotFound |
General Comments 0
You need to be logged in to leave comments.
Login now