From 16441b4938d3e9ef41fbb3b8b51b5d99e02a56d4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 1 Dec 2012 16:25:20 +0000 Subject: [PATCH] Code cleanup. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10902 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/versions_controller.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 00683cf34..852f7a590 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -20,7 +20,7 @@ class VersionsController < ApplicationController model_object Version before_filter :find_model_object, :except => [:index, :new, :create, :close_completed] before_filter :find_project_from_association, :except => [:index, :new, :create, :close_completed] - before_filter :find_project, :only => [:index, :new, :create, :close_completed] + before_filter :find_project_by_project_id, :only => [:index, :new, :create, :close_completed] before_filter :authorize accept_api_auth :index, :show, :create, :update, :destroy @@ -169,12 +169,7 @@ class VersionsController < ApplicationController end end -private - def find_project - @project = Project.find(params[:project_id]) - rescue ActiveRecord::RecordNotFound - render_404 - end + private def retrieve_selected_tracker_ids(selectable_trackers, default_trackers=nil) if ids = params[:tracker_ids] @@ -183,5 +178,4 @@ private @selected_tracker_ids = (default_trackers || selectable_trackers).collect {|t| t.id.to_s } end end - end -- 2.39.5