summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-17 17:30:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-17 17:30:14 +0000
commitf0c676d3df2c2f78aca79c9adfff80823fa48132 (patch)
tree6846ed3e6c2182982c59fdbda7a84b7d954a3f09 /app
parentb44317b76255be4c8d8551655f78007c505cf580 (diff)
downloadredmine-f0c676d3df2c2f78aca79c9adfff80823fa48132.tar.gz
redmine-f0c676d3df2c2f78aca79c9adfff80823fa48132.zip
Adds missing scope for r2595.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2596 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 3a278a759..4e2a3c647 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -54,6 +54,8 @@ class Issue < ActiveRecord::Base
named_scope :visible, lambda {|*args| { :include => :project,
:conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } }
+ named_scope :open, :conditions => ["#{IssueStatus.table_name}.is_closed = ?", false], :include => :status
+
# Returns true if usr or current user is allowed to view the issue
def visible?(usr=nil)
(usr || User.current).allowed_to?(:view_issues, self.project)