Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11960 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e0c7eb25a4
commit
7371077fa2
|
@ -14,8 +14,8 @@ module Redmine
|
|||
has_many :watcher_users, :through => :watchers, :source => :user, :validate => false
|
||||
|
||||
scope :watched_by, lambda { |user_id|
|
||||
{ :include => :watchers,
|
||||
:conditions => ["#{Watcher.table_name}.user_id = ?", user_id] }
|
||||
joins(:watchers).
|
||||
where("#{Watcher.table_name}.user_id = ?", user_id)
|
||||
}
|
||||
attr_protected :watcher_ids, :watcher_user_ids
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue