Initialize watcher_user_ids for new records to prevent useless queries on each #watched_by?.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8554 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-01-08 12:26:57 +00:00
parent 2a55d37619
commit 906fcd290c
1 changed files with 1 additions and 0 deletions

View File

@ -119,6 +119,7 @@ class Issue < ActiveRecord::Base
# set default values for new records only
self.status ||= IssueStatus.default
self.priority ||= IssuePriority.default
self.watcher_user_ids = []
end
end