Code cleanup.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10904 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-02 09:59:22 +00:00
parent 88d5663ad2
commit 6e1ff5bba6
3 changed files with 16 additions and 26 deletions
+1 -13
View File
@@ -313,19 +313,7 @@ class IssuesController < ApplicationController
end
end
private
def find_issue
# Issue.visible.find(...) can not be used to redirect user to the login form
# if the issue actually exists but requires authentication
@issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])
unless @issue.visible?
deny_access
return
end
@project = @issue.project
rescue ActiveRecord::RecordNotFound
render_404
end
private
def find_project
project_id = params[:project_id] || (params[:issue] && params[:issue][:project_id])