summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index e7a444d7d..0f6312f2c 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -47,7 +47,8 @@ class Issue < ActiveRecord::Base
acts_as_customizable
acts_as_watchable
acts_as_searchable :columns => ['subject', "#{table_name}.description"],
- :preload => [:project, :status, :tracker]
+ :preload => [:project, :status, :tracker],
+ :scope => lambda {|options| options[:open_issues] ? self.open : self.all}
acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"},
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}},