summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
index 4ce3bb4a1..e31026dcb 100644
--- a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
+++ b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
@@ -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