diff options
author | Go MAEDA <maeda@farend.jp> | 2020-10-17 02:02:50 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-10-17 02:02:50 +0000 |
commit | e48ff4882010df59f467433979fe27ebec39c0ee (patch) | |
tree | 8adad19a6932cf9cc364b300e9ddf8488412f2b3 /app/models/issue.rb | |
parent | d9c6249a9cdf97010a992fd2c52e68c64f6a4e99 (diff) | |
download | redmine-e48ff4882010df59f467433979fe27ebec39c0ee.tar.gz redmine-e48ff4882010df59f467433979fe27ebec39c0ee.zip |
Evaluate acts_as_activity_provider's scope lazily (#33664).
Patch by Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@20148 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 8c3146137..3ccace46e 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -51,7 +51,7 @@ class Issue < ActiveRecord::Base :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}}, :type => Proc.new {|o| 'issue' + (o.closed? ? '-closed' : '')} - acts_as_activity_provider :scope => preload(:project, :author, :tracker, :status), + acts_as_activity_provider :scope => proc { preload(:project, :author, :tracker, :status) }, :author_key => :author_id DONE_RATIO_OPTIONS = %w(issue_field issue_status) |