Skip to content

Commit

Permalink
Refactored IssueStatus finder to a before_filter
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3410 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
edavis10 committed Feb 11, 2010
1 parent 2c8a240 commit 937d0c7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/controllers/reports_controller.rb
Expand Up @@ -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
Expand All @@ -42,8 +40,6 @@ def issue_report
end

def issue_report_details
@statuses = IssueStatus.find(:all, :order => 'position')

case params[:detail]
when "tracker"
@field = "tracker_id"
Expand Down Expand Up @@ -91,4 +87,9 @@ def issue_report_details
end
end

private

def find_issue_statuses
@statuses = IssueStatus.find(:all, :order => 'position')
end
end

0 comments on commit 937d0c7

Please sign in to comment.