diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-11 16:42:52 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-11 16:42:52 +0000 |
commit | 937d0c70f770912de8637798cded5071149876c0 (patch) | |
tree | 6bb77bbb4ed443427163c4f3f3d21433aa933826 /app/controllers/reports_controller.rb | |
parent | 2c8a24092b60802da700ad33deb3e201bbb6658e (diff) | |
download | redmine-937d0c70f770912de8637798cded5071149876c0.tar.gz redmine-937d0c70f770912de8637798cded5071149876c0.zip |
Refactored IssueStatus finder to a before_filter
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3410 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/reports_controller.rb')
-rw-r--r-- | app/controllers/reports_controller.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 19eee5fba..4b7942a7c 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -17,11 +17,9 @@ class ReportsController < ApplicationController menu_item :issues - before_filter :find_project, :authorize + before_filter :find_project, :authorize, :find_issue_statuses def issue_report - @statuses = IssueStatus.find(:all, :order => 'position') - @trackers = @project.trackers @versions = @project.shared_versions.sort @priorities = IssuePriority.all @@ -42,8 +40,6 @@ class ReportsController < ApplicationController end def issue_report_details - @statuses = IssueStatus.find(:all, :order => 'position') - case params[:detail] when "tracker" @field = "tracker_id" @@ -91,4 +87,9 @@ class ReportsController < ApplicationController end end + private + + def find_issue_statuses + @statuses = IssueStatus.find(:all, :order => 'position') + end end |