diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-01 16:25:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-01 16:25:20 +0000 |
commit | 16441b4938d3e9ef41fbb3b8b51b5d99e02a56d4 (patch) | |
tree | 5fe40adfa36e6844c9c18cbc9dc2e7800c8c74fa | |
parent | 65d3bffad7fdc0aeb1ad51df55ec57cd0878a378 (diff) | |
download | redmine-16441b4938d3e9ef41fbb3b8b51b5d99e02a56d4.tar.gz redmine-16441b4938d3e9ef41fbb3b8b51b5d99e02a56d4.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10902 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/versions_controller.rb | 10 |
1 files 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 |