From: Jean-Philippe Lang Date: Wed, 7 Mar 2012 20:03:05 +0000 (+0000) Subject: Use #find_project_by_project_id from super-class. X-Git-Tag: 1.4.0~188 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=036b81abfd552bb9df766986b1a3715e72a56564;p=redmine.git Use #find_project_by_project_id from super-class. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9160 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/issue_categories_controller.rb b/app/controllers/issue_categories_controller.rb index 4701142d0..703636497 100644 --- a/app/controllers/issue_categories_controller.rb +++ b/app/controllers/issue_categories_controller.rb @@ -20,7 +20,7 @@ class IssueCategoriesController < ApplicationController model_object IssueCategory before_filter :find_model_object, :except => [:index, :new, :create] before_filter :find_project_from_association, :except => [:index, :new, :create] - before_filter :find_project, :only => [:index, :new, :create] + before_filter :find_project_by_project_id, :only => [:index, :new, :create] before_filter :authorize accept_api_auth :index, :show, :create, :update, :destroy @@ -116,10 +116,4 @@ private super @category = @object end - - def find_project - @project = Project.find(params[:project_id]) - rescue ActiveRecord::RecordNotFound - render_404 - end end