diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-06-11 18:29:29 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-06-11 18:29:29 +0000 |
commit | 7371077fa27cfc7442a74be5e1c53b40fa6724d8 (patch) | |
tree | a7d14d377c4518a5dd468121deb565bb3da09d58 /lib | |
parent | e0c7eb25a42e6b052c90b32014ef7dc96560f47f (diff) | |
download | redmine-7371077fa27cfc7442a74be5e1c53b40fa6724d8.tar.gz redmine-7371077fa27cfc7442a74be5e1c53b40fa6724d8.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11960 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb | 4 |
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 |